VALUE rbgobj_make_boxed_default(gpointer p, GType gtype) { const RGObjClassInfo *cinfo; cinfo = GTYPE2CINFO(gtype); return rbgobj_make_boxed_raw(p, gtype, cinfo->klass, cinfo->flags); }
static VALUE boxed_instance2robj(gpointer instance, gpointer user_data) { BoxedInstance2RObjData *data = user_data; VALUE default_rb_instance; VALUE klass; gint flags = 0; ID id_call; default_rb_instance = rbgobj_make_boxed_default(instance, data->type); CONST_ID(id_call, "call"); klass = rb_funcall(data->rb_converter, id_call, 1, default_rb_instance); return rbgobj_make_boxed_raw(instance, data->type, klass, flags); }