diff options
author | apolcyn <apolcyn@google.com> | 2017-08-24 15:40:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-24 15:40:47 -0700 |
commit | f28955d40d199a31459388ca2770467509181290 (patch) | |
tree | 51666342e0f5ca5d0eb3a90e3bd069e05aa32780 /src | |
parent | cad427b2f79b5e2fcb0ca36a0f9118e6e1294959 (diff) | |
parent | b0eae8a08e4965b9093b838a2d54da0e032cc178 (diff) |
Merge pull request #12237 from andremedeiros/fix-gc-eager-sweep
Mark error code details as global
Diffstat (limited to 'src')
-rw-r--r-- | src/ruby/ext/grpc/rb_call.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ruby/ext/grpc/rb_call.c b/src/ruby/ext/grpc/rb_call.c index 74f189e1e0..5550bb7d5f 100644 --- a/src/ruby/ext/grpc/rb_call.c +++ b/src/ruby/ext/grpc/rb_call.c @@ -905,6 +905,9 @@ static void Init_grpc_error_codes() { rb_define_const(grpc_rb_mRpcErrors, "INVALID_FLAGS", UINT2NUM(GRPC_CALL_ERROR_INVALID_FLAGS)); + /* Hint the GC that this is a global and shouldn't be sweeped. */ + rb_global_variable(&rb_error_code_details); + /* Add the detail strings to a Hash */ rb_error_code_details = rb_hash_new(); rb_hash_aset(rb_error_code_details, UINT2NUM(GRPC_CALL_OK), |