aboutsummaryrefslogtreecommitdiff
path: root/inout.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-07-12 17:00:26 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-07-12 17:00:26 -0300
commit6dfdb765388da481a7020e44e7cfb253f9751699 (patch)
tree95af256d806f52658b6a268a0f6509f4383aa252 /inout.c
parent9a3c51cff1b925e125197e89a4c867c1d99ad1ba (diff)
downloadlua-6dfdb765388da481a7020e44e7cfb253f9751699.tar.gz
lua-6dfdb765388da481a7020e44e7cfb253f9751699.tar.bz2
lua-6dfdb765388da481a7020e44e7cfb253f9751699.zip
C functions don't need to "pushnil" to return nil value (this is
the default value).
Diffstat (limited to 'inout.c')
-rw-r--r--inout.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/inout.c b/inout.c
index 9850974e..1d618596 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.36 1996/03/19 22:28:37 roberto Exp roberto $"; 8char *rcs_inout="$Id: inout.c,v 2.37 1996/05/28 21:07:32 roberto Exp $";
9 9
10#include <stdio.h> 10#include <stdio.h>
11 11
@@ -113,8 +113,6 @@ void lua_internaldostring (void)
113 lua_Object obj = lua_getparam (1); 113 lua_Object obj = lua_getparam (1);
114 if (lua_isstring(obj) && !lua_dostring(lua_getstring(obj))) 114 if (lua_isstring(obj) && !lua_dostring(lua_getstring(obj)))
115 lua_pushnumber(1); 115 lua_pushnumber(1);
116 else
117 lua_pushnil();
118} 116}
119 117
120/* 118/*
@@ -131,8 +129,6 @@ void lua_internaldofile (void)
131 /* else fname = NULL */ 129 /* else fname = NULL */
132 if (!lua_dofile(fname)) 130 if (!lua_dofile(fname))
133 lua_pushnumber(1); 131 lua_pushnumber(1);
134 else
135 lua_pushnil();
136} 132}
137 133
138 134
@@ -218,8 +214,6 @@ void lua_obj2number (void)
218 lua_Object o = lua_getparam(1); 214 lua_Object o = lua_getparam(1);
219 if (lua_isnumber(o)) 215 if (lua_isnumber(o))
220 lua_pushnumber(lua_getnumber(o)); 216 lua_pushnumber(lua_getnumber(o));
221 else
222 lua_pushnil();
223} 217}
224 218
225 219