diff options
Diffstat (limited to '')
| -rw-r--r-- | ldo.c | 7 | ||||
| -rw-r--r-- | ldo.h | 4 | ||||
| -rw-r--r-- | lfunc.c | 5 | ||||
| -rw-r--r-- | lfunc.h | 5 | ||||
| -rw-r--r-- | lvm.c | 6 | ||||
| -rw-r--r-- | lvm.h | 4 |
6 files changed, 17 insertions, 14 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldo.c,v 1.48 1999/10/04 17:51:04 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 1.49 1999/10/14 17:53:35 roberto Exp roberto $ |
| 3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -101,7 +101,7 @@ void luaD_lineHook (int line) { | |||
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | 103 | ||
| 104 | void luaD_callHook (StkId base, TProtoFunc *tf, int isreturn) { | 104 | void luaD_callHook (StkId base, const TProtoFunc *tf, int isreturn) { |
| 105 | struct C_Lua_Stack oldCLS = L->Cstack; | 105 | struct C_Lua_Stack oldCLS = L->Cstack; |
| 106 | StkId old_top = L->Cstack.lua2C = L->Cstack.base = L->stack.top-L->stack.stack; | 106 | StkId old_top = L->Cstack.lua2C = L->Cstack.base = L->stack.top-L->stack.stack; |
| 107 | L->Cstack.num = 0; | 107 | L->Cstack.num = 0; |
| @@ -143,7 +143,8 @@ static StkId callC (lua_CFunction f, StkId base) { | |||
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | 145 | ||
| 146 | static StkId callCclosure (struct Closure *cl, lua_CFunction f, StkId base) { | 146 | static StkId callCclosure (const struct Closure *cl, |
| 147 | lua_CFunction f, StkId base) { | ||
| 147 | TObject *pbase; | 148 | TObject *pbase; |
| 148 | int nup = cl->nelems; /* number of upvalues */ | 149 | int nup = cl->nelems; /* number of upvalues */ |
| 149 | luaD_checkstack(nup); | 150 | luaD_checkstack(nup); |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldo.h,v 1.7 1999/08/16 20:52:00 roberto Exp roberto $ | 2 | ** $Id: ldo.h,v 1.8 1999/10/04 17:51:04 roberto Exp roberto $ |
| 3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -34,7 +34,7 @@ void luaD_init (void); | |||
| 34 | void luaD_adjusttop (StkId newtop); | 34 | void luaD_adjusttop (StkId newtop); |
| 35 | void luaD_openstack (int nelems); | 35 | void luaD_openstack (int nelems); |
| 36 | void luaD_lineHook (int line); | 36 | void luaD_lineHook (int line); |
| 37 | void luaD_callHook (StkId base, TProtoFunc *tf, int isreturn); | 37 | void luaD_callHook (StkId base, const TProtoFunc *tf, int isreturn); |
| 38 | void luaD_calln (int nArgs, int nResults); | 38 | void luaD_calln (int nArgs, int nResults); |
| 39 | void luaD_callTM (const TObject *f, int nParams, int nResults); | 39 | void luaD_callTM (const TObject *f, int nParams, int nResults); |
| 40 | int luaD_protectedrun (void); | 40 | int luaD_protectedrun (void); |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lfunc.c,v 1.11 1999/08/16 20:52:00 roberto Exp roberto $ | 2 | ** $Id: lfunc.c,v 1.12 1999/10/04 17:51:04 roberto Exp roberto $ |
| 3 | ** Auxiliary functions to manipulate prototypes and closures | 3 | ** Auxiliary functions to manipulate prototypes and closures |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -62,7 +62,8 @@ void luaF_freeclosure (Closure *c) { | |||
| 62 | ** Look for n-th local variable at line "line" in function "func". | 62 | ** Look for n-th local variable at line "line" in function "func". |
| 63 | ** Returns NULL if not found. | 63 | ** Returns NULL if not found. |
| 64 | */ | 64 | */ |
| 65 | const char *luaF_getlocalname (TProtoFunc *func, int local_number, int line) { | 65 | const char *luaF_getlocalname (const TProtoFunc *func, |
| 66 | int local_number, int line) { | ||
| 66 | int count = 0; | 67 | int count = 0; |
| 67 | const char *varname = NULL; | 68 | const char *varname = NULL; |
| 68 | LocVar *lv = func->locvars; | 69 | LocVar *lv = func->locvars; |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lfunc.h,v 1.6 1999/08/16 20:52:00 roberto Exp roberto $ | 2 | ** $Id: lfunc.h,v 1.7 1999/10/04 17:51:04 roberto Exp roberto $ |
| 3 | ** Lua Function structures | 3 | ** Lua Function structures |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -17,7 +17,8 @@ Closure *luaF_newclosure (int nelems); | |||
| 17 | void luaF_freeproto (TProtoFunc *f); | 17 | void luaF_freeproto (TProtoFunc *f); |
| 18 | void luaF_freeclosure (Closure *c); | 18 | void luaF_freeclosure (Closure *c); |
| 19 | 19 | ||
| 20 | const char *luaF_getlocalname (TProtoFunc *func, int local_number, int line); | 20 | const char *luaF_getlocalname (const TProtoFunc *func, |
| 21 | int local_number, int line); | ||
| 21 | 22 | ||
| 22 | 23 | ||
| 23 | #endif | 24 | #endif |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lvm.c,v 1.62 1999/09/17 16:53:54 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 1.63 1999/10/14 19:13:31 roberto Exp roberto $ |
| 3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -35,7 +35,7 @@ | |||
| 35 | 35 | ||
| 36 | 36 | ||
| 37 | 37 | ||
| 38 | static TaggedString *strconc (TaggedString *l, TaggedString *r) { | 38 | static TaggedString *strconc (const TaggedString *l, const TaggedString *r) { |
| 39 | long nl = l->u.s.len; | 39 | long nl = l->u.s.len; |
| 40 | long nr = r->u.s.len; | 40 | long nr = r->u.s.len; |
| 41 | char *buffer = luaL_openspace(nl+nr); | 41 | char *buffer = luaL_openspace(nl+nr); |
| @@ -296,7 +296,7 @@ static void adjust_varargs (StkId first_extra_arg) { | |||
| 296 | ** [stack+base,top). Returns n such that the the results are between | 296 | ** [stack+base,top). Returns n such that the the results are between |
| 297 | ** [stack+n,top). | 297 | ** [stack+n,top). |
| 298 | */ | 298 | */ |
| 299 | StkId luaV_execute (Closure *cl, TProtoFunc *tf, StkId base) { | 299 | StkId luaV_execute (const Closure *cl, const TProtoFunc *tf, StkId base) { |
| 300 | struct Stack *S = &L->stack; /* to optimize */ | 300 | struct Stack *S = &L->stack; /* to optimize */ |
| 301 | register const Byte *pc = tf->code; | 301 | register const Byte *pc = tf->code; |
| 302 | const TObject *consts = tf->consts; | 302 | const TObject *consts = tf->consts; |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lvm.h,v 1.8 1999/02/08 17:07:59 roberto Exp roberto $ | 2 | ** $Id: lvm.h,v 1.9 1999/08/16 20:52:00 roberto Exp roberto $ |
| 3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -26,7 +26,7 @@ void luaV_settable (const TObject *t); | |||
| 26 | void luaV_rawsettable (const TObject *t); | 26 | void luaV_rawsettable (const TObject *t); |
| 27 | void luaV_getglobal (TaggedString *ts); | 27 | void luaV_getglobal (TaggedString *ts); |
| 28 | void luaV_setglobal (TaggedString *ts); | 28 | void luaV_setglobal (TaggedString *ts); |
| 29 | StkId luaV_execute (Closure *cl, TProtoFunc *tf, StkId base); | 29 | StkId luaV_execute (const Closure *cl, const TProtoFunc *tf, StkId base); |
| 30 | void luaV_closure (int nelems); | 30 | void luaV_closure (int nelems); |
| 31 | void luaV_comparison (lua_Type ttype_less, lua_Type ttype_equal, | 31 | void luaV_comparison (lua_Type ttype_less, lua_Type ttype_equal, |
| 32 | lua_Type ttype_great, IMS op); | 32 | lua_Type ttype_great, IMS op); |
