mirror of https://github.com/rusefi/lua.git
details (comments)
This commit is contained in:
parent
27f7bd2e83
commit
2f4d429071
8
lgc.c
8
lgc.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lgc.c,v 2.194 2014/09/03 16:54:41 roberto Exp roberto $
|
** $Id: lgc.c,v 2.195 2014/09/04 18:15:29 roberto Exp roberto $
|
||||||
** Garbage Collector
|
** Garbage Collector
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -852,7 +852,7 @@ static GCObject **findlast (GCObject **p) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** move all unreachable objects (or 'all' objects) that need
|
** move all unreachable objects (or 'all' objects) that need
|
||||||
** finalization from list 'p' to list 'tobefnz' (to be finalized)
|
** finalization from list 'finobj' to list 'tobefnz' (to be finalized)
|
||||||
*/
|
*/
|
||||||
static void separatetobefnz (global_State *g, int all) {
|
static void separatetobefnz (global_State *g, int all) {
|
||||||
GCObject *curr;
|
GCObject *curr;
|
||||||
|
@ -863,7 +863,7 @@ static void separatetobefnz (global_State *g, int all) {
|
||||||
if (!(iswhite(curr) || all)) /* not being collected? */
|
if (!(iswhite(curr) || all)) /* not being collected? */
|
||||||
p = &curr->next; /* don't bother with it */
|
p = &curr->next; /* don't bother with it */
|
||||||
else {
|
else {
|
||||||
*p = curr->next; /* remove 'curr' from "fin" list */
|
*p = curr->next; /* remove 'curr' from 'finobj' list */
|
||||||
curr->next = *lastnext; /* link at the end of 'tobefnz' list */
|
curr->next = *lastnext; /* link at the end of 'tobefnz' list */
|
||||||
*lastnext = curr;
|
*lastnext = curr;
|
||||||
lastnext = &curr->next;
|
lastnext = &curr->next;
|
||||||
|
@ -891,7 +891,7 @@ void luaC_checkfinalizer (lua_State *L, GCObject *o, Table *mt) {
|
||||||
/* search for pointer pointing to 'o' */
|
/* search for pointer pointing to 'o' */
|
||||||
for (p = &g->allgc; *p != o; p = &(*p)->next) { /* empty */ }
|
for (p = &g->allgc; *p != o; p = &(*p)->next) { /* empty */ }
|
||||||
*p = o->next; /* remove 'o' from 'allgc' list */
|
*p = o->next; /* remove 'o' from 'allgc' list */
|
||||||
o->next = g->finobj; /* link it in "fin" list */
|
o->next = g->finobj; /* link it in 'finobj' list */
|
||||||
g->finobj = o;
|
g->finobj = o;
|
||||||
l_setbit(o->marked, FINALIZEDBIT); /* mark it as such */
|
l_setbit(o->marked, FINALIZEDBIT); /* mark it as such */
|
||||||
}
|
}
|
||||||
|
|
4
liolib.c
4
liolib.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: liolib.c,v 2.129 2014/09/26 14:09:21 roberto Exp roberto $
|
** $Id: liolib.c,v 2.130 2014/10/01 16:05:06 roberto Exp roberto $
|
||||||
** Standard I/O (and system) library
|
** Standard I/O (and system) library
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -195,7 +195,7 @@ static LStream *newprefile (lua_State *L) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Calls the 'close' function from a file handle. The 'volatile' avoids
|
** Calls the 'close' function from a file handle. The 'volatile' avoids
|
||||||
** a bug in some verisions of the Clang compiler (e.g., clang 3.0 for
|
** a bug in some versions of the Clang compiler (e.g., clang 3.0 for
|
||||||
** 32 bits).
|
** 32 bits).
|
||||||
*/
|
*/
|
||||||
static int aux_close (lua_State *L) {
|
static int aux_close (lua_State *L) {
|
||||||
|
|
Loading…
Reference in New Issue