mirror of https://github.com/rusefi/lua.git
comments
This commit is contained in:
parent
2d2d45976c
commit
dbc5451bea
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lbaselib.c,v 1.107 2002/11/14 15:41:38 roberto Exp roberto $
|
** $Id: lbaselib.c,v 1.108 2002/11/18 11:20:01 roberto Exp roberto $
|
||||||
** Basic library
|
** Basic library
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -78,7 +78,7 @@ static int luaB_error (lua_State *L) {
|
||||||
int level = luaL_optint(L, 2, 1);
|
int level = luaL_optint(L, 2, 1);
|
||||||
luaL_checkany(L, 1);
|
luaL_checkany(L, 1);
|
||||||
if (!lua_isstring(L, 1) || level == 0)
|
if (!lua_isstring(L, 1) || level == 0)
|
||||||
lua_pushvalue(L, 1); /* propagate error mesage without changes */
|
lua_pushvalue(L, 1); /* propagate error message without changes */
|
||||||
else { /* add extra information */
|
else { /* add extra information */
|
||||||
luaL_where(L, level);
|
luaL_where(L, level);
|
||||||
lua_pushvalue(L, 1);
|
lua_pushvalue(L, 1);
|
||||||
|
@ -440,7 +440,7 @@ static const char *getpath (lua_State *L) {
|
||||||
|
|
||||||
static const char *pushnextpath (lua_State *L, const char *path) {
|
static const char *pushnextpath (lua_State *L, const char *path) {
|
||||||
const char *l;
|
const char *l;
|
||||||
if (*path == '\0') return NULL; /* no more pathes */
|
if (*path == '\0') return NULL; /* no more paths */
|
||||||
if (*path == LUA_PATH_SEP) path++; /* skip separator */
|
if (*path == LUA_PATH_SEP) path++; /* skip separator */
|
||||||
l = strchr(path, LUA_PATH_SEP); /* find next separator */
|
l = strchr(path, LUA_PATH_SEP); /* find next separator */
|
||||||
if (l == NULL) l = path+strlen(path);
|
if (l == NULL) l = path+strlen(path);
|
||||||
|
|
4
ldo.c
4
ldo.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: ldo.c,v 1.207 2002/11/21 17:19:11 roberto Exp roberto $
|
** $Id: ldo.c,v 1.208 2002/11/22 17:16:52 roberto Exp roberto $
|
||||||
** Stack and Call structure of Lua
|
** Stack and Call structure of Lua
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -246,7 +246,7 @@ StkId luaD_precall (lua_State *L, StkId func) {
|
||||||
ci->state = CI_C; /* a C function */
|
ci->state = CI_C; /* a C function */
|
||||||
if (L->hookmask & LUA_MASKCALL) {
|
if (L->hookmask & LUA_MASKCALL) {
|
||||||
luaD_callhook(L, LUA_HOOKCALL, -1);
|
luaD_callhook(L, LUA_HOOKCALL, -1);
|
||||||
ci = L->ci; /* previous call may realocate `ci' */
|
ci = L->ci; /* previous call may reallocate `ci' */
|
||||||
}
|
}
|
||||||
lua_unlock(L);
|
lua_unlock(L);
|
||||||
#ifdef LUA_COMPATUPVALUES
|
#ifdef LUA_COMPATUPVALUES
|
||||||
|
|
4
lgc.c
4
lgc.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lgc.c,v 1.161 2002/11/21 15:46:20 roberto Exp roberto $
|
** $Id: lgc.c,v 1.162 2002/11/21 17:19:11 roberto Exp roberto $
|
||||||
** Garbage Collector
|
** Garbage Collector
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -470,7 +470,7 @@ static void mark (lua_State *L) {
|
||||||
marktmu(&st); /* mark `preserved' userdata */
|
marktmu(&st); /* mark `preserved' userdata */
|
||||||
propagatemarks(&st); /* remark, to propagate `preserveness' */
|
propagatemarks(&st); /* remark, to propagate `preserveness' */
|
||||||
cleartablekeys(wkv);
|
cleartablekeys(wkv);
|
||||||
/* `propagatemarks' may reborne some weak tables; clear them too */
|
/* `propagatemarks' may resuscitate some weak tables; clear them too */
|
||||||
cleartablekeys(st.wk);
|
cleartablekeys(st.wk);
|
||||||
cleartablevalues(st.wv);
|
cleartablevalues(st.wv);
|
||||||
cleartablekeys(st.wkv);
|
cleartablekeys(st.wkv);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: llimits.h,v 1.48 2002/11/22 16:35:20 roberto Exp roberto $
|
** $Id: llimits.h,v 1.49 2002/11/22 17:16:52 roberto Exp roberto $
|
||||||
** Limits, basic types, and some other `installation-dependent' definitions
|
** Limits, basic types, and some other `installation-dependent' definitions
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -57,7 +57,7 @@ typedef long ls_nstr;
|
||||||
typedef long ls_count;
|
typedef long ls_count;
|
||||||
|
|
||||||
|
|
||||||
/* chars used as small naturals (so that `char' is reserved for characteres) */
|
/* chars used as small naturals (so that `char' is reserved for characters) */
|
||||||
typedef unsigned char lu_byte;
|
typedef unsigned char lu_byte;
|
||||||
|
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ typedef LUSER_ALIGNMENT_T L_Umaxalign;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* result of `usual argument convertion' over lua_Number */
|
/* result of `usual argument conversion' over lua_Number */
|
||||||
#ifndef LUA_UACNUMBER
|
#ifndef LUA_UACNUMBER
|
||||||
typedef double l_uacNumber;
|
typedef double l_uacNumber;
|
||||||
#else
|
#else
|
||||||
|
|
10
lstate.h
10
lstate.h
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lstate.h,v 1.105 2002/11/21 15:46:44 roberto Exp roberto $
|
** $Id: lstate.h,v 1.106 2002/11/22 17:16:52 roberto Exp roberto $
|
||||||
** Global State
|
** Global State
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -15,12 +15,12 @@
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** macros for thread syncronization inside Lua core machine:
|
** macros for thread synchronization inside Lua core machine:
|
||||||
** all accesses to the global state and to global objects are syncronized.
|
** all accesses to the global state and to global objects are synchronized.
|
||||||
** Because threads can read the stack of other threads
|
** Because threads can read the stack of other threads
|
||||||
** (when running garbage collection),
|
** (when running garbage collection),
|
||||||
** a thread must also syncronize any write-access to its own stack.
|
** a thread must also synchronize any write-access to its own stack.
|
||||||
** Unsyncronized accesses are allowed only when reading its own stack,
|
** Unsynchronized accesses are allowed only when reading its own stack,
|
||||||
** or when reading immutable fields from global objects
|
** or when reading immutable fields from global objects
|
||||||
** (such as string values and udata values).
|
** (such as string values and udata values).
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue