From e1df182e555c6193b1e50fd99696ddf16304306f Mon Sep 17 00:00:00 2001 From: tasn Date: Tue, 8 May 2012 14:22:57 +0000 Subject: [PATCH] Eo: Added a new magic type to mark already deleted objects. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/PROTO/eobj@70875 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- lib/eo.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/eo.c b/lib/eo.c index 7af9e6e..24f2d47 100644 --- a/lib/eo.c +++ b/lib/eo.c @@ -33,7 +33,9 @@ typedef struct #define EO_EINA_MAGIC 0xa186bc32 /* Nothing magical about this number. */ #define EO_EINA_MAGIC_STR "Eo" -#define EO_CLASS_EINA_MAGIC 0xa186bb32 /* Nothing magical about this number. */ +#define EO_DELETED_EINA_MAGIC 0xa186bb32 /* Nothing magical about this number. */ +#define EO_DELETED_EINA_MAGIC_STR "Eo - Deleted object" +#define EO_CLASS_EINA_MAGIC 0xa186ba32 /* Nothing magical about this number. */ #define EO_CLASS_EINA_MAGIC_STR "Eo Class" #define EO_MAGIC_RETURN_VAL(d, magic, ret) \ @@ -1128,6 +1130,7 @@ _eo_unref(Eo *obj) _eo_callback_remove_all(obj); + EINA_MAGIC_SET(obj, EO_DELETED_EINA_MAGIC); free(obj); } } @@ -1319,6 +1322,8 @@ eo_init(void) } eina_magic_string_static_set(EO_EINA_MAGIC, EO_EINA_MAGIC_STR); + eina_magic_string_static_set(EO_DELETED_EINA_MAGIC, + EO_DELETED_EINA_MAGIC_STR); eina_magic_string_static_set(EO_CLASS_EINA_MAGIC, EO_CLASS_EINA_MAGIC_STR); -- 2.7.4