aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/error.h
diff options
context:
space:
mode:
authorGravatar Soheil Hassas Yeganeh <soheil@google.com>2018-10-18 16:37:07 -0400
committerGravatar Soheil Hassas Yeganeh <soheil@google.com>2018-10-18 16:37:07 -0400
commit24b6d7194f85892f09c7104924ce607ff231af6f (patch)
tree5cb32cd99663c142cfec93edf6149a9e081ccce5 /src/core/lib/iomgr/error.h
parent3a9411ca1e733ce9f87b22136014c7a00bdeacbd (diff)
Add comment for grpc_error_get_int().
Explain that the input parameter cannot be nullptr.
Diffstat (limited to 'src/core/lib/iomgr/error.h')
-rw-r--r--src/core/lib/iomgr/error.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h
index 6978ef6d91..cb740d5b01 100644
--- a/src/core/lib/iomgr/error.h
+++ b/src/core/lib/iomgr/error.h
@@ -194,6 +194,8 @@ inline void grpc_error_unref(grpc_error* err) {
grpc_error* grpc_error_set_int(grpc_error* src, grpc_error_ints which,
intptr_t value) GRPC_MUST_USE_RESULT;
+/// It is an error to pass nullptr as `p`. Caller should allocate a dummy
+/// intptr_t for `p`, even if the value of `p` is not used.
bool grpc_error_get_int(grpc_error* error, grpc_error_ints which, intptr_t* p);
/// This call takes ownership of the slice; the error is responsible for
/// eventually unref-ing it.