summaryrefslogtreecommitdiff
path: root/fallback.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1994-11-21 16:22:58 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1994-11-21 16:22:58 -0200
commit609392ff2e02eb44fa48c8563faf5994fc55297c (patch)
treeae4d3a4094a795a3c04583895007f0d6119da52a /fallback.c
parent96ea2e0fb462789015824823801ba34782364b68 (diff)
downloadlua-github-609392ff2e02eb44fa48c8563faf5994fc55297c.tar.gz
fallback for "call expression not a function" errors
Diffstat (limited to 'fallback.c')
-rw-r--r--fallback.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/fallback.c b/fallback.c
index a41712cc..0076da24 100644
--- a/fallback.c
+++ b/fallback.c
@@ -3,7 +3,7 @@
** TecCGraf - PUC-Rio
*/
-char *rcs_fallback="$Id: fallback.c,v 1.7 1994/11/18 19:46:21 roberto Exp roberto $";
+char *rcs_fallback="$Id: fallback.c,v 1.8 1994/11/21 13:30:15 roberto Exp roberto $";
#include <stdio.h>
@@ -21,6 +21,7 @@ static void arithFB (void);
static void concatFB (void);
static void orderFB (void);
static void GDFB (void);
+static void funcFB (void);
/*
@@ -34,7 +35,8 @@ struct FB luaI_fallBacks[] = {
{"order", {LUA_T_CFUNCTION, orderFB}},
{"concat", {LUA_T_CFUNCTION, concatFB}},
{"settable", {LUA_T_CFUNCTION, gettableFB}},
-{"gc", {LUA_T_CFUNCTION, GDFB}}
+{"gc", {LUA_T_CFUNCTION, GDFB}},
+{"function", {LUA_T_CFUNCTION, funcFB}}
};
#define N_FB (sizeof(luaI_fallBacks)/sizeof(struct FB))
@@ -103,6 +105,11 @@ static void orderFB (void)
static void GDFB (void) { }
+static void funcFB (void)
+{
+ lua_reportbug("call expression not a function");
+}
+
/*
** Lock routines