4 /* Only allow setting three attributes, should be sufficient for testing. */
5 static VALUE
sa_struct_define(VALUE self
, VALUE name
,
6 VALUE attr1
, VALUE attr2
, VALUE attr3
) {
8 const char *a1
= StringValuePtr(attr1
);
9 const char *a2
= StringValuePtr(attr2
);
10 const char *a3
= StringValuePtr(attr3
);
13 if (name
!= Qnil
) nm
= StringValuePtr(name
);
15 return rb_struct_define(nm
, a1
, a2
, a3
, NULL
);
18 void Init_subtend_struct_define() {
20 cls
= rb_define_class("SubtendStructDefine", rb_cObject
);
21 rb_define_method(cls
, "rb_struct_define", sa_struct_define
, 4);