"luaI_malloc(s)" is just a macro to "luaI_realloc(NULL, s)".

This commit is contained in:
Roberto Ierusalimschy
1996-05-24 11:31:10 -03:00
parent 29f0021837
commit f9deeac632
2 changed files with 10 additions and 19 deletions

View File

@@ -1,7 +1,7 @@
/*
** mem.c
** memory manager for lua
** $Id: mem.h,v 1.6 1996/03/21 18:54:29 roberto Exp roberto $
** $Id: mem.h,v 1.7 1996/04/22 18:00:37 roberto Exp roberto $
*/
#ifndef mem_h
@@ -24,12 +24,12 @@
void luaI_free (void *block);
void *luaI_malloc (unsigned long size);
void *luaI_realloc (void *oldblock, unsigned long size);
void *luaI_buffer (unsigned long size);
int luaI_growvector (void **block, unsigned long nelems, int size,
char *errormsg, unsigned long limit);
#define luaI_malloc(s) luaI_realloc(NULL, (s))
#define new(s) ((s *)luaI_malloc(sizeof(s)))
#define newvector(n,s) ((s *)luaI_malloc((n)*sizeof(s)))
#define growvector(old,n,s,e,l) \