macros for closure sizes are global

This commit is contained in:
Roberto Ierusalimschy
2003-11-24 16:50:36 -02:00
parent 8bc6c68021
commit 5ee63257f9
2 changed files with 9 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lfunc.c,v 1.70 2003/11/17 19:50:05 roberto Exp roberto $
** $Id: lfunc.c,v 1.71 2003/11/19 19:41:30 roberto Exp roberto $
** Auxiliary functions to manipulate prototypes and closures
** See Copyright Notice in lua.h
*/
@@ -18,13 +18,6 @@
#include "lstate.h"
#define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \
cast(int, sizeof(TObject)*((n)-1)))
#define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \
cast(int, sizeof(TObject *)*((n)-1)))
Closure *luaF_newCclosure (lua_State *L, int nelems) {
Closure *c = cast(Closure *, luaM_malloc(L, sizeCclosure(nelems)));