projects
/
ruby-edje.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use TO_EVAS_OBJECT. Mark the swallowed object.
[ruby-edje.git]
/
src
/
rb_part.c
diff --git
a/src/rb_part.c
b/src/rb_part.c
index e20259c48411daf307442a1d2bdcc88159162080..42347d3d965a0406507974b09a372ab34ed2efa3 100644
(file)
--- a/
src/rb_part.c
+++ b/
src/rb_part.c
@@
-1,5
+1,5
@@
/*
/*
- * $Id: rb_part.c
59 2004-08-10 14:10:3
1Z tilman $
+ * $Id: rb_part.c
69 2004-08-16 15:42:5
1Z tilman $
*
* Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
*
*
* Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
*
@@
-103,6
+103,7
@@
static VALUE c_swallow (VALUE self, VALUE target)
GET_OBJ (target, RbEvasObject, t);
edje_object_part_swallow (e->real.real, GET_NAME (self), t->real);
GET_OBJ (target, RbEvasObject, t);
edje_object_part_swallow (e->real.real, GET_NAME (self), t->real);
+ rb_iv_set (self, "swallowed_obj", target);
return Qnil;
}
return Qnil;
}
@@
-127,6
+128,7
@@
static VALUE c_unswallow (VALUE self)
}
edje_object_part_unswallow (e->real.real, o);
}
edje_object_part_unswallow (e->real.real, o);
+ rb_iv_set (self, "swallowed_obj", Qnil);
return Qnil;
}
return Qnil;
}
@@
-142,7
+144,6
@@
static VALUE c_unswallow (VALUE self)
static VALUE c_swallowed_object_get (VALUE self)
{
Evas_Object *o;
static VALUE c_swallowed_object_get (VALUE self)
{
Evas_Object *o;
- void *obj;
GET_OBJ (GET_EDJE (self), RbEdje, e);
GET_OBJ (GET_EDJE (self), RbEdje, e);
@@
-150,12
+151,7
@@
static VALUE c_swallowed_object_get (VALUE self)
if (!o)
return Qnil;
if (!o)
return Qnil;
- if (!(obj = evas_object_data_get (o, RUBY_EVAS_OBJECT_KEY))) {
- rb_raise (rb_eException, "EvasObject Ruby object key missing");
- return Qnil;
- }
-
- return (VALUE) obj;
+ return TO_EVAS_OBJECT (o);
}
/*
}
/*