aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1994-12-16 13:55:04 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1994-12-16 13:55:04 -0200
commit3365a352431a0def0acccec0807751962726c4be (patch)
tree983a035d7f292f0ac16a17298df401a323bf512b
parentfad57bfa008523c3568b613989a6a3f87f3cb83b (diff)
downloadlua-3365a352431a0def0acccec0807751962726c4be.tar.gz
lua-3365a352431a0def0acccec0807751962726c4be.tar.bz2
lua-3365a352431a0def0acccec0807751962726c4be.zip
new constant LUA_NOOBJECT
-rw-r--r--hash.c6
-rw-r--r--inout.c6
-rw-r--r--table.c6
3 files changed, 9 insertions, 9 deletions
diff --git a/hash.c b/hash.c
index 89b28fa6..c9b27b10 100644
--- a/hash.c
+++ b/hash.c
@@ -3,7 +3,7 @@
3** hash manager for lua 3** hash manager for lua
4*/ 4*/
5 5
6char *rcs_hash="$Id: hash.c,v 2.20 1994/11/25 19:27:03 roberto Exp $"; 6char *rcs_hash="$Id: hash.c,v 2.20 1994/11/28 15:10:51 roberto Exp roberto $";
7 7
8#include "mem.h" 8#include "mem.h"
9#include "opcode.h" 9#include "opcode.h"
@@ -313,9 +313,9 @@ void lua_next (void)
313 Hash *t; 313 Hash *t;
314 lua_Object o = lua_getparam(1); 314 lua_Object o = lua_getparam(1);
315 lua_Object r = lua_getparam(2); 315 lua_Object r = lua_getparam(2);
316 if (o == 0 || r == 0) 316 if (o == LUA_NOOBJECT || r == LUA_NOOBJECT)
317 lua_error ("too few arguments to function `next'"); 317 lua_error ("too few arguments to function `next'");
318 if (lua_getparam(3) != 0) 318 if (lua_getparam(3) != LUA_NOOBJECT)
319 lua_error ("too many arguments to function `next'"); 319 lua_error ("too many arguments to function `next'");
320 if (!lua_istable(o)) 320 if (!lua_istable(o))
321 lua_error ("first argument of function `next' is not a table"); 321 lua_error ("first argument of function `next' is not a table");
diff --git a/inout.c b/inout.c
index 0f879d60..e782045d 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.13 1994/11/23 14:32:00 roberto Stab $"; 8char *rcs_inout="$Id: inout.c,v 2.14 1994/12/13 15:54:21 roberto Exp roberto $";
9 9
10#include <stdio.h> 10#include <stdio.h>
11#include <stdlib.h> 11#include <stdlib.h>
@@ -214,7 +214,7 @@ void lua_print (void)
214{ 214{
215 int i=1; 215 int i=1;
216 lua_Object obj; 216 lua_Object obj;
217 while ((obj=lua_getparam (i++)) != 0) 217 while ((obj=lua_getparam (i++)) != LUA_NOOBJECT)
218 { 218 {
219 if (lua_isnumber(obj)) printf("%g\n",lua_getnumber(obj)); 219 if (lua_isnumber(obj)) printf("%g\n",lua_getnumber(obj));
220 else if (lua_isstring(obj)) printf("%s\n",lua_getstring(obj)); 220 else if (lua_isstring(obj)) printf("%s\n",lua_getstring(obj));
@@ -235,7 +235,7 @@ void lua_print (void)
235void luaI_type (void) 235void luaI_type (void)
236{ 236{
237 lua_Object o = lua_getparam(1); 237 lua_Object o = lua_getparam(1);
238 if (o == 0) 238 if (o == LUA_NOOBJECT)
239 lua_error("no parameter to function 'type'"); 239 lua_error("no parameter to function 'type'");
240 switch (lua_type(o)) 240 switch (lua_type(o))
241 { 241 {
diff --git a/table.c b/table.c
index 2a3bb213..faea133f 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.22 1994/11/21 21:41:09 roberto Exp roberto $"; 6char *rcs_table="$Id: table.c,v 2.23 1994/11/23 14:31:11 roberto Stab roberto $";
7 7
8#include <string.h> 8#include <string.h>
9 9
@@ -226,9 +226,9 @@ static void lua_nextvar (void)
226 char *varname; 226 char *varname;
227 TreeNode *next; 227 TreeNode *next;
228 lua_Object o = lua_getparam(1); 228 lua_Object o = lua_getparam(1);
229 if (o == 0) 229 if (o == LUA_NOOBJECT)
230 lua_reportbug("too few arguments to function `nextvar'"); 230 lua_reportbug("too few arguments to function `nextvar'");
231 if (lua_getparam(2) != NULL) 231 if (lua_getparam(2) != LUA_NOOBJECT)
232 lua_reportbug("too many arguments to function `nextvar'"); 232 lua_reportbug("too many arguments to function `nextvar'");
233 if (lua_isnil(o)) 233 if (lua_isnil(o))
234 varname = NULL; 234 varname = NULL;