__DEL(x) should be defined as free(x) because we don't use alloca() call -- noch

This commit is contained in:
Norayr Chilingarian 2015-02-09 21:08:34 +04:00
parent aaa2ee2288
commit 8b8dd6fd14

View file

@ -150,7 +150,8 @@ static int __STRCMP(x, y)
//#define __DUP(x, l, t) x=(void*)memcpy(alloca(l*sizeof(t)),x,l*sizeof(t))
#define __DUP(x, l, t) x=(void*)memcpy(malloc(l*sizeof(t)),x,l*sizeof(t))
#define __DUPARR(v, t) v=(void*)memcpy(v##__copy,v,sizeof(t))
#define __DEL(x) /* DUP with alloca frees storage automatically */
//#define __DEL(x) /* DUP with alloca frees storage automatically */
#define __DEL(x) free(x)
#define __IS(tag, typ, level) (*(tag-(__BASEOFF-level))==(long)typ##__typ)
#define __TYPEOF(p) (*(((long**)(p))-1))
#define __ISP(p, typ, level) __IS(__TYPEOF(p),typ,level)