diff options
Diffstat (limited to 'src/core/security/security_context.h')
-rw-r--r-- | src/core/security/security_context.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/core/security/security_context.h b/src/core/security/security_context.h index d8909cd6f1..20c4390898 100644 --- a/src/core/security/security_context.h +++ b/src/core/security/security_context.h @@ -55,9 +55,22 @@ grpc_auth_context *grpc_auth_context_create(grpc_auth_context *chained, size_t property_count); /* Refcounting. */ -grpc_auth_context *grpc_auth_context_ref( - grpc_auth_context *ctx); -void grpc_auth_context_unref(grpc_auth_context *ctx); +#ifdef GRPC_AUTH_CONTEXT_REFCOUNT_DEBUG +#define GRPC_AUTH_CONTEXT_REF(p, r) \ + grpc_auth_context_ref((p), __FILE__, __LINE__, (r)) +#define GRPC_AUTH_CONTEXT_UNREF(p, r) \ + grpc_auth_context_unref((p), __FILE__, __LINE__, (r)) +grpc_auth_context *grpc_auth_context_ref(grpc_auth_context *policy, + const char *file, int line, + const char *reason); +void grpc_auth_context_unref(grpc_auth_context *policy, const char *file, + int line, const char *reason); +#else +#define GRPC_AUTH_CONTEXT_REF(p, r) grpc_auth_context_ref((p)) +#define GRPC_AUTH_CONTEXT_UNREF(p, r) grpc_auth_context_unref((p)) +grpc_auth_context *grpc_auth_context_ref(grpc_auth_context *policy); +void grpc_auth_context_unref(grpc_auth_context *policy); +#endif grpc_auth_property grpc_auth_property_init_from_cstring(const char *name, const char *value); |