functions "luaI_free" and "luaI_realloc" (or macro "growvector") may be

called with NULL.
This commit is contained in:
Roberto Ierusalimschy
1996-02-22 17:34:33 -03:00
parent 05caf09a36
commit 8c1a9899d4
6 changed files with 33 additions and 57 deletions

View File

@@ -1,7 +1,7 @@
/*
** mem.c
** memory manager for lua
** $Id: mem.h,v 1.1 1994/11/16 17:38:08 roberto Stab roberto $
** $Id: mem.h,v 1.2 1995/01/13 22:11:12 roberto Exp roberto $
*/
#ifndef mem_h
@@ -15,8 +15,6 @@ void luaI_free (void *block);
void *luaI_malloc (unsigned long size);
void *luaI_realloc (void *oldblock, unsigned long size);
char *luaI_strdup (char *str);
#define new(s) ((s *)luaI_malloc(sizeof(s)))
#define newvector(n,s) ((s *)luaI_malloc((n)*sizeof(s)))
#define growvector(old,n,s) ((s *)luaI_realloc(old,(n)*sizeof(s)))