void Init_struct() { VALUE struct_module = rb_const_get(thrift_module, rb_intern("Struct")); rb_define_method(struct_module, "write", rb_thrift_struct_write, 1); rb_define_method(struct_module, "read", rb_thrift_struct_read, 1); set_default_proto_function_pointers(); mt = default_mt; }
void Init_struct() { VALUE struct_module = rb_const_get(thrift_module, rb_intern("Struct")); rb_define_method(struct_module, "write", rb_thrift_struct_write, 1); rb_define_method(struct_module, "read", rb_thrift_struct_read, 1); thrift_union_class = rb_const_get(thrift_module, rb_intern("Union")); rb_define_method(thrift_union_class, "write", rb_thrift_union_write, 1); rb_define_method(thrift_union_class, "read", rb_thrift_union_read, 1); setfield_id = rb_intern("@setfield"); setvalue_id = rb_intern("@value"); to_s_method_id = rb_intern("to_s"); name_to_id_method_id = rb_intern("name_to_id"); set_default_proto_function_pointers(); mt = default_mt; }