From 312f78d9258376473bc21079518db6942f7ff939 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 16 Jun 1997 15:43:19 -0300 Subject: [PATCH] default error method is not nil (nil does nothing). --- fallback.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/fallback.c b/fallback.c index 4aed4690..999499de 100644 --- a/fallback.c +++ b/fallback.c @@ -3,7 +3,7 @@ ** TecCGraf - PUC-Rio */ -char *rcs_fallback="$Id: fallback.c,v 2.5 1997/04/24 22:59:57 roberto Exp roberto $"; +char *rcs_fallback="$Id: fallback.c,v 2.6 1997/06/09 17:28:14 roberto Exp roberto $"; #include #include @@ -238,7 +238,14 @@ void luaI_settagmethod (void) } -static TObject errorim = {LUA_T_NIL, {NULL}}; +static void stderrorim (void) +{ + lua_Object s = lua_getparam(1); + if (lua_isstring(s)) + fprintf(stderr, "lua: %s\n", lua_getstring(s)); +} + +static TObject errorim = {LUA_T_CFUNCTION, {stderrorim}}; TObject *luaI_geterrorim (void)