aboutsummaryrefslogtreecommitdiff
path: root/table.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1995-05-02 15:43:03 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1995-05-02 15:43:03 -0300
commit18ea2eff80c720632cb6a89d560c5cce2377df06 (patch)
tree67fc3acd282d134099b2f92657e191baeaff1277 /table.c
parent8156604823aa487f4436d33fe89302598faab3db (diff)
downloadlua-18ea2eff80c720632cb6a89d560c5cce2377df06.tar.gz
lua-18ea2eff80c720632cb6a89d560c5cce2377df06.tar.bz2
lua-18ea2eff80c720632cb6a89d560c5cce2377df06.zip
calls to "lua_reportbug" changed to "lua_error", since
"lua_reportbug" is only an internal function to build debug information
Diffstat (limited to 'table.c')
-rw-r--r--table.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/table.c b/table.c
index ac471124..75fa21f2 100644
--- a/table.c
+++ b/table.c
@@ -3,7 +3,7 @@
3** Module to control static tables 3** Module to control static tables
4*/ 4*/
5 5
6char *rcs_table="$Id: table.c,v 2.27 1995/01/13 22:11:12 roberto Exp celes $"; 6char *rcs_table="$Id: table.c,v 2.28 1995/01/18 20:15:54 celes Exp roberto $";
7 7
8#include <string.h> 8#include <string.h>
9 9
@@ -11,8 +11,8 @@ char *rcs_table="$Id: table.c,v 2.27 1995/01/13 22:11:12 roberto Exp celes $";
11#include "opcode.h" 11#include "opcode.h"
12#include "tree.h" 12#include "tree.h"
13#include "hash.h" 13#include "hash.h"
14#include "inout.h"
15#include "table.h" 14#include "table.h"
15#include "inout.h"
16#include "lua.h" 16#include "lua.h"
17#include "fallback.h" 17#include "fallback.h"
18 18
@@ -228,14 +228,14 @@ static void lua_nextvar (void)
228 TreeNode *next; 228 TreeNode *next;
229 lua_Object o = lua_getparam(1); 229 lua_Object o = lua_getparam(1);
230 if (o == LUA_NOOBJECT) 230 if (o == LUA_NOOBJECT)
231 lua_reportbug("too few arguments to function `nextvar'"); 231 lua_error("too few arguments to function `nextvar'");
232 if (lua_getparam(2) != LUA_NOOBJECT) 232 if (lua_getparam(2) != LUA_NOOBJECT)
233 lua_reportbug("too many arguments to function `nextvar'"); 233 lua_error("too many arguments to function `nextvar'");
234 if (lua_isnil(o)) 234 if (lua_isnil(o))
235 varname = NULL; 235 varname = NULL;
236 else if (!lua_isstring(o)) 236 else if (!lua_isstring(o))
237 { 237 {
238 lua_reportbug("incorrect argument to function `nextvar'"); 238 lua_error("incorrect argument to function `nextvar'");
239 return; /* to avoid warnings */ 239 return; /* to avoid warnings */
240 } 240 }
241 else 241 else
@@ -262,7 +262,7 @@ static void setglobal (void)
262 lua_Object name = lua_getparam(1); 262 lua_Object name = lua_getparam(1);
263 lua_Object value = lua_getparam(2); 263 lua_Object value = lua_getparam(2);
264 if (!lua_isstring(name)) 264 if (!lua_isstring(name))
265 lua_reportbug("incorrect argument to function `setglobal'"); 265 lua_error("incorrect argument to function `setglobal'");
266 lua_pushobject(value); 266 lua_pushobject(value);
267 lua_storeglobal(lua_getstring(name)); 267 lua_storeglobal(lua_getstring(name));
268} 268}
@@ -272,6 +272,6 @@ static void getglobal (void)
272{ 272{
273 lua_Object name = lua_getparam(1); 273 lua_Object name = lua_getparam(1);
274 if (!lua_isstring(name)) 274 if (!lua_isstring(name))
275 lua_reportbug("incorrect argument to function `getglobal'"); 275 lua_error("incorrect argument to function `getglobal'");
276 lua_pushobject(lua_getglobal(lua_getstring(name))); 276 lua_pushobject(lua_getglobal(lua_getstring(name)));
277} 277}