diff options
Diffstat (limited to 'src/ruby/ext/grpc/rb_grpc.h')
-rw-r--r-- | src/ruby/ext/grpc/rb_grpc.h | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/src/ruby/ext/grpc/rb_grpc.h b/src/ruby/ext/grpc/rb_grpc.h index 851f5ee69f..a502273de1 100644 --- a/src/ruby/ext/grpc/rb_grpc.h +++ b/src/ruby/ext/grpc/rb_grpc.h @@ -38,26 +38,36 @@ #include <ruby.h> #include <grpc/support/time.h> -/* rb_mGrpcCore is the module containing the ruby wrapper GRPC classes. */ -extern VALUE rb_mGrpcCore; +/* grpc_rb_mGrpcCore is the module containing the ruby wrapper GRPC classes. */ +extern VALUE grpc_rb_mGrpcCore; -/* Class used to wrap timeval structs. */ -extern VALUE rb_cTimeVal; +/* grpc_rb_sNewServerRpc is the struct that holds new server rpc details. */ +extern VALUE grpc_rb_sNewServerRpc; -/* rb_sNewServerRpc is the struct that holds new server rpc details. */ -extern VALUE rb_sNewServerRpc; +/* grpc_rb_sStruct is the struct that holds status details. */ +extern VALUE grpc_rb_sStatus; -/* rb_sStruct is the struct that holds status details. */ -extern VALUE rb_sStatus; +/* sym_code is the symbol for the code attribute of grpc_rb_sStatus. */ +extern VALUE sym_code; + +/* sym_details is the symbol for the details attribute of grpc_rb_sStatus. */ +extern VALUE sym_details; + +/* sym_metadata is the symbol for the metadata attribute of grpc_rb_sStatus. */ +extern VALUE sym_metadata; /* GC_NOT_MARKED is used in calls to Data_Wrap_Struct to indicate that the wrapped struct does not need to participate in ruby gc. */ -extern const RUBY_DATA_FUNC GC_NOT_MARKED; +#define GRPC_RB_GC_NOT_MARKED (RUBY_DATA_FUNC)(NULL) /* GC_DONT_FREED is used in calls to Data_Wrap_Struct to indicate that the wrapped struct should not be freed the wrapped ruby object is released by the garbage collector. */ -extern const RUBY_DATA_FUNC GC_DONT_FREE; +#define GRPC_RB_GC_DONT_FREE (RUBY_DATA_FUNC)(NULL) + +/* GRPC_RB_MEMSIZE_UNAVAILABLE is used in rb_data_type_t to indicate that the + * number of bytes used by the wrapped struct is not available. */ +#define GRPC_RB_MEMSIZE_UNAVAILABLE (size_t (*)(const void*))(NULL) /* A ruby object alloc func that fails by raising an exception. */ VALUE grpc_rb_cannot_alloc(VALUE cls); |