From 2af060461fc67791e6531c24d013f97e28fd61dd Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Sat, 2 Jun 2012 18:04:02 +0200 Subject: eiotas_private: add macro STRINGSHARE_FREE(_st) --- src/lib/eiotas_private.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') 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) { \ -- cgit v1.2.3