mirror of https://github.com/rusefi/lua.git
'luaI_travfallbacks' now can look for a fallback.
This commit is contained in:
parent
b17c76817d
commit
970995c3f2
10
fallback.c
10
fallback.c
|
@ -3,7 +3,7 @@
|
||||||
** TecCGraf - PUC-Rio
|
** TecCGraf - PUC-Rio
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char *rcs_fallback="$Id: fallback.c,v 1.14 1995/10/04 14:20:26 roberto Exp roberto $";
|
char *rcs_fallback="$Id: fallback.c,v 1.15 1995/10/09 13:14:29 roberto Exp roberto $";
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -162,7 +162,7 @@ Object *luaI_getlocked (int ref)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void luaI_travlock (void (*fn)(Object *))
|
void luaI_travlock (int (*fn)(Object *))
|
||||||
{
|
{
|
||||||
Word i;
|
Word i;
|
||||||
for (i=0; i<lockSize; i++)
|
for (i=0; i<lockSize; i++)
|
||||||
|
@ -170,9 +170,11 @@ void luaI_travlock (void (*fn)(Object *))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void luaI_travfallbacks (void (*fn)(Object *))
|
char *luaI_travfallbacks (int (*fn)(Object *))
|
||||||
{
|
{
|
||||||
Word i;
|
Word i;
|
||||||
for (i=0; i<N_FB; i++)
|
for (i=0; i<N_FB; i++)
|
||||||
fn(&luaI_fallBacks[i].function);
|
if (fn(&luaI_fallBacks[i].function))
|
||||||
|
return luaI_fallBacks[i].kind;
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: fallback.h,v 1.8 1995/10/04 14:20:26 roberto Exp roberto $
|
** $Id: fallback.h,v 1.9 1995/10/09 13:14:29 roberto Exp roberto $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef fallback_h
|
#ifndef fallback_h
|
||||||
|
@ -27,8 +27,8 @@ extern struct FB {
|
||||||
void luaI_setfallback (void);
|
void luaI_setfallback (void);
|
||||||
int luaI_lock (Object *object);
|
int luaI_lock (Object *object);
|
||||||
Object *luaI_getlocked (int ref);
|
Object *luaI_getlocked (int ref);
|
||||||
void luaI_travlock (void (*fn)(Object *));
|
void luaI_travlock (int (*fn)(Object *));
|
||||||
void luaI_travfallbacks (void (*fn)(Object *));
|
char *luaI_travfallbacks (int (*fn)(Object *));
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue