mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 07:32:24 +00:00
__DEL(x) should be defined as free(x) because we don't use alloca() call -- noch
Former-commit-id: 8b8dd6fd14
This commit is contained in:
parent
5a2aceb681
commit
1cd968926f
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(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 __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 __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 __IS(tag, typ, level) (*(tag-(__BASEOFF-level))==(long)typ##__typ)
|
||||||
#define __TYPEOF(p) (*(((long**)(p))-1))
|
#define __TYPEOF(p) (*(((long**)(p))-1))
|
||||||
#define __ISP(p, typ, level) __IS(__TYPEOF(p),typ,level)
|
#define __ISP(p, typ, level) __IS(__TYPEOF(p),typ,level)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue