new #define LUA_COMPAT2_5 to select "compatibility mode".

This commit is contained in:
Roberto Ierusalimschy
1997-06-23 15:27:53 -03:00
parent 3e43275308
commit e81f184164
5 changed files with 36 additions and 24 deletions

View File

@@ -3,7 +3,7 @@
** TecCGraf - PUC-Rio
*/
char *rcs_fallback="$Id: fallback.c,v 2.7 1997/06/16 18:43:19 roberto Exp roberto $";
char *rcs_fallback="$Id: fallback.c,v 2.8 1997/06/17 17:27:07 roberto Exp roberto $";
#include <stdio.h>
#include <string.h>
@@ -281,7 +281,7 @@ char *luaI_travfallbacks (int (*fn)(TObject *))
* ===================================================================
* compatibility with old fallback system
*/
#if LUA_COMPAT2_5
static void errorFB (void)
{
@@ -310,6 +310,7 @@ static void fillvalids (IMS e, TObject *func)
*luaI_getim(t, e) = *func;
}
void luaI_setfallback (void)
{
static char *oldnames [] = {"error", "getglobal", "arith", "order", NULL};
@@ -364,4 +365,4 @@ void luaI_setfallback (void)
else
lua_pushcfunction(replace);
}
#endif