mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 19:12:25 +00:00
__DEL(x) should be defined as free(x) because we don't use alloca() call -- noch
This commit is contained in:
parent
aaa2ee2288
commit
8b8dd6fd14
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue