- GET_OBJ (target, Evas_Object, target2, "EvasObject");
-
- edje_object_part_swallow (*e, StringValuePtr (part), *target2);
-
- return Qnil;
-}
-
-static VALUE c_part_unswallow (VALUE self, VALUE target)
-{
- GET_OBJ (self, Evas_Object, e, "Edje");
-
- if (!rb_obj_is_kind_of (target, cEvasObject)) {
- rb_raise (rb_eTypeError,
- "wrong argument type %s (expected EvasObject)",
- rb_obj_classname (target));
- return Qnil;
+ if (NIL_P (part = rb_hash_aref (e->parts, name))) {
+ part = TO_PART (self, name);
+ rb_hash_aset (e->parts, name, part);