Merge pull request #4 from stanley-cheung/plugin_credentials_api_fix

Fixed some PHP errors
pull/12374/head
Mark D. Roth 7 years ago committed by GitHub
commit 8cc7e6700f
  1. 1
      src/php/ext/grpc/call_credentials.c
  2. 9
      src/php/ext/grpc/call_credentials.h

@ -35,6 +35,7 @@
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/grpc_security.h> #include <grpc/grpc_security.h>
#include <grpc/support/string_util.h>
zend_class_entry *grpc_ce_call_credentials; zend_class_entry *grpc_ce_call_credentials;
#if PHP_MAJOR_VERSION >= 7 #if PHP_MAJOR_VERSION >= 7

@ -65,9 +65,12 @@ typedef struct plugin_state {
} plugin_state; } plugin_state;
/* Callback function for plugin creds API */ /* Callback function for plugin creds API */
void plugin_get_metadata(void *state, grpc_auth_metadata_context context, int plugin_get_metadata(
grpc_credentials_plugin_metadata_cb cb, void *ptr, grpc_auth_metadata_context context,
void *user_data); grpc_credentials_plugin_metadata_cb cb, void *user_data,
grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX],
size_t *num_creds_md, grpc_status_code *status,
const char **error_details);
/* Cleanup function for plugin creds API */ /* Cleanup function for plugin creds API */
void plugin_destroy_state(void *ptr); void plugin_destroy_state(void *ptr);

Loading…
Cancel
Save