We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Data_Wrap_Struct
1 parent 3ed4844 commit 576ddc3Copy full SHA for 576ddc3
1 file changed
ext/glamour/extension.c
@@ -178,8 +178,18 @@ static VALUE glamour_version_rb(VALUE self) {
178
179
/* Renderer class methods */
180
181
+static const rb_data_type_t renderer_data_type = {
182
+ .wrap_struct_name = "Glamour::Renderer",
183
+ .function = {
184
+ .dmark = NULL,
185
+ .dfree = NULL,
186
+ .dsize = NULL,
187
+ },
188
+ .flags = RUBY_TYPED_FREE_IMMEDIATELY,
189
+};
190
+
191
static VALUE renderer_alloc(VALUE klass) {
- return Data_Wrap_Struct(klass, NULL, NULL, NULL);
192
+ return TypedData_Wrap_Struct(klass, &renderer_data_type, NULL);
193
}
194
195
static VALUE renderer_initialize(int argc, VALUE *argv, VALUE self) {
0 commit comments