default error method is not nil (nil does nothing).

This commit is contained in:
Roberto Ierusalimschy 1997-06-16 15:43:19 -03:00
parent e4b69d6c9c
commit 312f78d925
1 changed files with 9 additions and 2 deletions

View File

@ -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 <stdio.h>
#include <string.h>
@ -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)