diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-12-16 13:55:04 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-12-16 13:55:04 -0200 |
commit | 3365a352431a0def0acccec0807751962726c4be (patch) | |
tree | 983a035d7f292f0ac16a17298df401a323bf512b /inout.c | |
parent | fad57bfa008523c3568b613989a6a3f87f3cb83b (diff) | |
download | lua-3365a352431a0def0acccec0807751962726c4be.tar.gz lua-3365a352431a0def0acccec0807751962726c4be.tar.bz2 lua-3365a352431a0def0acccec0807751962726c4be.zip |
new constant LUA_NOOBJECT
Diffstat (limited to 'inout.c')
-rw-r--r-- | inout.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -5,7 +5,7 @@ | |||
5 | ** Also provides some predefined lua functions. | 5 | ** Also provides some predefined lua functions. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | char *rcs_inout="$Id: inout.c,v 2.13 1994/11/23 14:32:00 roberto Stab $"; | 8 | char *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) | |||
235 | void luaI_type (void) | 235 | void 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 | { |