E
Elias Athanasopoulos
Hello!
Consider I have:
static VALUE foo_init (self)
{
return self;
}
cFoo = rb_define_class ("Foo", cFoo);
rb_define_method (cFoo, "initialize", foo_init, 0);
Now I want, from a method of another class, to create a new Foo
object, which contains nothing.
I don't want to use Data_Make_Struct() since the object is
not connected with a C structure.
How can I do this simple thing? Perhaps using the NEWOBJ()
macro? But, again how can a specify that the new object's type
is Foo?
Regards,
Consider I have:
static VALUE foo_init (self)
{
return self;
}
cFoo = rb_define_class ("Foo", cFoo);
rb_define_method (cFoo, "initialize", foo_init, 0);
Now I want, from a method of another class, to create a new Foo
object, which contains nothing.
I don't want to use Data_Make_Struct() since the object is
not connected with a C structure.
How can I do this simple thing? Perhaps using the NEWOBJ()
macro? But, again how can a specify that the new object's type
is Foo?
Regards,