aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-06-16 15:43:19 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-06-16 15:43:19 -0300
commit312f78d9258376473bc21079518db6942f7ff939 (patch)
treefa5a8477fac15d09a15915dfa937551639cae7eb
parente4b69d6c9cb92658e39e5ae5cd85e01fcc8f6408 (diff)
downloadlua-312f78d9258376473bc21079518db6942f7ff939.tar.gz
lua-312f78d9258376473bc21079518db6942f7ff939.tar.bz2
lua-312f78d9258376473bc21079518db6942f7ff939.zip
default error method is not nil (nil does nothing).
-rw-r--r--fallback.c11
1 files 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 @@
3** TecCGraf - PUC-Rio 3** TecCGraf - PUC-Rio
4*/ 4*/
5 5
6char *rcs_fallback="$Id: fallback.c,v 2.5 1997/04/24 22:59:57 roberto Exp roberto $"; 6char *rcs_fallback="$Id: fallback.c,v 2.6 1997/06/09 17:28:14 roberto Exp roberto $";
7 7
8#include <stdio.h> 8#include <stdio.h>
9#include <string.h> 9#include <string.h>
@@ -238,7 +238,14 @@ void luaI_settagmethod (void)
238} 238}
239 239
240 240
241static TObject errorim = {LUA_T_NIL, {NULL}}; 241static void stderrorim (void)
242{
243 lua_Object s = lua_getparam(1);
244 if (lua_isstring(s))
245 fprintf(stderr, "lua: %s\n", lua_getstring(s));
246}
247
248static TObject errorim = {LUA_T_CFUNCTION, {stderrorim}};
242 249
243 250
244TObject *luaI_geterrorim (void) 251TObject *luaI_geterrorim (void)