aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-08-16 14:58:02 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-08-16 14:58:02 -0300
commitb96b0b5abbf40cbdbed7952bf35a5a27ddf75928 (patch)
tree5d9d5463cb7d3424833abab20dd87bce1f4b240f /lauxlib.h
parentca13be9af784b7288d3a07d9b5bccb329086e885 (diff)
downloadlua-b96b0b5abbf40cbdbed7952bf35a5a27ddf75928.tar.gz
lua-b96b0b5abbf40cbdbed7952bf35a5a27ddf75928.tar.bz2
lua-b96b0b5abbf40cbdbed7952bf35a5a27ddf75928.zip
Added macro 'luaL_pushfail'
The macro 'luaL_pushfail' documents all places in the standard libraries that return nil to signal some kind of failure. It is defined as 'lua_pushnil'. The manual also got a notation (@fail) to document those returns. The tests were changed to be agnostic regarding whether 'fail' is 'nil' or 'false'.
Diffstat (limited to 'lauxlib.h')
-rw-r--r--lauxlib.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lauxlib.h b/lauxlib.h
index f68f6af1..c50cdf4d 100644
--- a/lauxlib.h
+++ b/lauxlib.h
@@ -153,6 +153,10 @@ LUALIB_API void (luaL_requiref) (lua_State *L, const char *modname,
153#define luaL_loadbuffer(L,s,sz,n) luaL_loadbufferx(L,s,sz,n,NULL) 153#define luaL_loadbuffer(L,s,sz,n) luaL_loadbufferx(L,s,sz,n,NULL)
154 154
155 155
156/* push the value used to represent failure/error */
157#define luaL_pushfail(L) lua_pushnil(L)
158
159
156/* 160/*
157** {====================================================== 161** {======================================================
158** Generic Buffer manipulation 162** Generic Buffer manipulation