evas evas_object_smart.c: evas_object_smart_smart_get() does the exactly same check.

SVN revision: 74952
This commit is contained in:
Daniel Juyung Seo 2012-08-07 00:57:09 +00:00
parent c343725133
commit 2cefdbcec6
1 changed files with 2 additions and 8 deletions

View File

@ -106,16 +106,13 @@ evas_object_smart_interface_get(const Evas_Object *obj,
{
Evas_Smart *s;
unsigned int i;
Evas_Object_Smart *o;
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return NULL;
MAGIC_CHECK_END();
o = (Evas_Object_Smart *)(obj->object_data);
if (!o) return NULL;
if (o->magic != MAGIC_OBJ_SMART) return NULL;
s = evas_object_smart_smart_get(obj);
if (!s) return NULL;
for (i = 0; i < s->interfaces.size; i++)
{
@ -134,18 +131,15 @@ EAPI void *
evas_object_smart_interface_data_get(const Evas_Object *obj,
const Evas_Smart_Interface *iface)
{
Evas_Object_Smart *o;
unsigned int i;
Evas_Smart *s;
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return NULL;
MAGIC_CHECK_END();
o = (Evas_Object_Smart *)(obj->object_data);
if (!o) return NULL;
if (o->magic != MAGIC_OBJ_SMART) return NULL;
s = evas_object_smart_smart_get(obj);
if (!s) return NULL;
for (i = 0; i < s->interfaces.size; i++)
{