aboutsummaryrefslogtreecommitdiff
path: root/inout.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1994-11-08 18:06:15 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1994-11-08 18:06:15 -0200
commit65f28f0824411bfe375a1dfa08c9cdc0eea2cb36 (patch)
tree2f00d3edcd53495e17fa60ea07ee8a12c47fb577 /inout.c
parent2cf954b8ae08a9094354551ee3733f4ff8078443 (diff)
downloadlua-65f28f0824411bfe375a1dfa08c9cdc0eea2cb36.tar.gz
lua-65f28f0824411bfe375a1dfa08c9cdc0eea2cb36.tar.bz2
lua-65f28f0824411bfe375a1dfa08c9cdc0eea2cb36.zip
error function for Lua
Diffstat (limited to 'inout.c')
-rw-r--r--inout.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/inout.c b/inout.c
index 711193fa..3e6b472b 100644
--- a/inout.c
+++ b/inout.c
@@ -5,7 +5,7 @@
5** Also provides some predefined lua functions. 5** Also provides some predefined lua functions.
6*/ 6*/
7 7
8char *rcs_inout="$Id: inout.c,v 2.7 1994/11/03 22:34:29 roberto Exp roberto $"; 8char *rcs_inout="$Id: inout.c,v 2.8 1994/11/07 16:34:44 roberto Exp roberto $";
9 9
10#include <stdio.h> 10#include <stdio.h>
11#include <stdlib.h> 11#include <stdlib.h>
@@ -264,3 +264,11 @@ void lua_obj2number (void)
264 lua_pushnil(); 264 lua_pushnil();
265} 265}
266 266
267
268void luaI_error (void)
269{
270 char *s = lua_getstring(lua_getparam(1));
271 if (s == NULL) s = "(no message)";
272 lua_error(s);
273}
274