summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-06-02 18:04:02 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-06-02 18:04:02 +0200
commit2af060461fc67791e6531c24d013f97e28fd61dd (patch)
tree25f3916abb1d7c5ee2e6553171f5e9f578d113bc /src/lib
parent227a25cd896657ef22d0d9d6980c9329c9607538 (diff)
downloadedoors-2af060461fc67791e6531c24d013f97e28fd61dd.zip
edoors-2af060461fc67791e6531c24d013f97e28fd61dd.tar.gz
eiotas_private: add macro STRINGSHARE_FREE(_st)
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/eiotas_private.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/eiotas_private.h b/src/lib/eiotas_private.h
index 7f610de..27ee9e8 100644
--- a/src/lib/eiotas_private.h
+++ b/src/lib/eiotas_private.h
@@ -56,6 +56,12 @@ int eiotas_iota_init(Eiotas_Iota *iota, const char *name, Eiotas_Iota *parent, E
return NULL; \
}
+#define STRINGSHARE_FREE(_st) \
+ if(_st) { \
+ eina_stringshare_del(_st); \
+ _st = NULL; \
+ }
+
#define BUILD_INSTANCE(_type,_x) \
_type *_x = (_type*)malloc(sizeof(_type)); \
if(_x==NULL) { \