aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lauxlib.c')
-rw-r--r--lauxlib.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lauxlib.c b/lauxlib.c
index c8a597e2..8324db35 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lauxlib.c,v 1.268 2014/09/22 06:42:15 roberto Exp roberto $ 2** $Id: lauxlib.c,v 1.269 2014/10/17 16:28:21 roberto Exp roberto $
3** Auxiliary functions for building Lua libraries 3** Auxiliary functions for building Lua libraries
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -229,7 +229,7 @@ LUALIB_API int luaL_fileresult (lua_State *L, int stat, const char *fname) {
229} 229}
230 230
231 231
232#if !defined(inspectstat) /* { */ 232#if !defined(l_inspectstat) /* { */
233 233
234#if defined(LUA_USE_POSIX) 234#if defined(LUA_USE_POSIX)
235 235
@@ -238,13 +238,13 @@ LUALIB_API int luaL_fileresult (lua_State *L, int stat, const char *fname) {
238/* 238/*
239** use appropriate macros to interpret 'pclose' return status 239** use appropriate macros to interpret 'pclose' return status
240*/ 240*/
241#define inspectstat(stat,what) \ 241#define l_inspectstat(stat,what) \
242 if (WIFEXITED(stat)) { stat = WEXITSTATUS(stat); } \ 242 if (WIFEXITED(stat)) { stat = WEXITSTATUS(stat); } \
243 else if (WIFSIGNALED(stat)) { stat = WTERMSIG(stat); what = "signal"; } 243 else if (WIFSIGNALED(stat)) { stat = WTERMSIG(stat); what = "signal"; }
244 244
245#else 245#else
246 246
247#define inspectstat(stat,what) /* no op */ 247#define l_inspectstat(stat,what) /* no op */
248 248
249#endif 249#endif
250 250
@@ -256,7 +256,7 @@ LUALIB_API int luaL_execresult (lua_State *L, int stat) {
256 if (stat == -1) /* error? */ 256 if (stat == -1) /* error? */
257 return luaL_fileresult(L, 0, NULL); 257 return luaL_fileresult(L, 0, NULL);
258 else { 258 else {
259 inspectstat(stat, what); /* interpret result */ 259 l_inspectstat(stat, what); /* interpret result */
260 if (*what == 'e' && stat == 0) /* successful termination? */ 260 if (*what == 'e' && stat == 0) /* successful termination? */
261 lua_pushboolean(L, 1); 261 lua_pushboolean(L, 1);
262 else 262 else