Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion ext/glamour/extension.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,18 @@ static VALUE glamour_version_rb(VALUE self) {

/* Renderer class methods */

static const rb_data_type_t renderer_data_type = {
.wrap_struct_name = "Glamour::Renderer",
.function = {
.dmark = NULL,
.dfree = NULL,
.dsize = NULL,
},
.flags = RUBY_TYPED_FREE_IMMEDIATELY,
};

static VALUE renderer_alloc(VALUE klass) {
return Data_Wrap_Struct(klass, NULL, NULL, NULL);
return TypedData_Wrap_Struct(klass, &renderer_data_type, NULL);
}

static VALUE renderer_initialize(int argc, VALUE *argv, VALUE self) {
Expand Down