Skip to content

Commit

Permalink
Fix Ruby 3.0 depreciation / Ruby 3.1 removal of rb_cData
Browse files Browse the repository at this point in the history
  • Loading branch information
wishdev committed Oct 19, 2021
1 parent 84f4a8d commit 46146c4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ext/iodine/iodine_connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ void iodine_connection_init(void) {
IodineStore.add(RAWSymbol);

// define the Connection Class and it's methods
ConnectionKlass = rb_define_class_under(IodineModule, "Connection", rb_cData);
ConnectionKlass = rb_define_class_under(IodineModule, "Connection", rb_cObject);
rb_define_alloc_func(ConnectionKlass, iodine_connection_data_alloc_c);
rb_define_method(ConnectionKlass, "write", iodine_connection_write, 1);
rb_define_method(ConnectionKlass, "close", iodine_connection_close, 0);
Expand Down
2 changes: 1 addition & 1 deletion ext/iodine/iodine_mustache.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ void iodine_init_mustache(void) {
rb_global_variable(&filename_id);
rb_global_variable(&data_id);
rb_global_variable(&template_id);
VALUE tmp = rb_define_class_under(IodineModule, "Mustache", rb_cData);
VALUE tmp = rb_define_class_under(IodineModule, "Mustache", rb_cObject);
rb_define_alloc_func(tmp, iodine_mustache_data_alloc_c);
rb_define_method(tmp, "initialize", iodine_mustache_new, -1);
rb_define_method(tmp, "render", iodine_mustache_render, 1);
Expand Down
2 changes: 1 addition & 1 deletion ext/iodine/iodine_store.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ struct IodineStorage_s IodineStore = {
void iodine_storage_init(void) {
fio_store_capa_require(&iodine_storage, 512);
VALUE tmp =
rb_define_class_under(rb_cObject, "IodineObjectStorage", rb_cData);
rb_define_class_under(rb_cObject, "IodineObjectStorage", rb_cObject);
VALUE storage_obj =
TypedData_Wrap_Struct(tmp, &storage_type_struct, &iodine_storage);
// rb_global_variable(&iodine_storage_obj);
Expand Down
2 changes: 1 addition & 1 deletion ext/iodine/iodine_tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ void iodine_init_tls(void) {
IODINE_MAKE_SYM(private_key);
IODINE_MAKE_SYM(password);

IodineTLSClass = rb_define_class_under(IodineModule, "TLS", rb_cData);
IodineTLSClass = rb_define_class_under(IodineModule, "TLS", rb_cObject);
rb_define_alloc_func(IodineTLSClass, iodine_tls_data_alloc_c);
rb_define_method(IodineTLSClass, "initialize", iodine_tls_new, -1);
rb_define_method(IodineTLSClass, "use_certificate",
Expand Down

0 comments on commit 46146c4

Please sign in to comment.