aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md1
-rw-r--r--c-api/compat-5.3.h3
2 files changed, 4 insertions, 0 deletions
diff --git a/README.md b/README.md
index 25bc911..6bab5f3 100644
--- a/README.md
+++ b/README.md
@@ -147,6 +147,7 @@ For Lua 5.1 additionally:
147* `lua_arith` (see [here][19]) 147* `lua_arith` (see [here][19])
148* `lua_compare` 148* `lua_compare`
149* `lua_len`, `lua_rawlen`, and `luaL_len` 149* `lua_len`, `lua_rawlen`, and `luaL_len`
150* `lua_pushstring` (return value)
150* `lua_copy` 151* `lua_copy`
151* `lua_pushglobaltable` 152* `lua_pushglobaltable`
152* `luaL_testudata` 153* `luaL_testudata`
diff --git a/c-api/compat-5.3.h b/c-api/compat-5.3.h
index 0083eb4..67e1da6 100644
--- a/c-api/compat-5.3.h
+++ b/c-api/compat-5.3.h
@@ -119,6 +119,9 @@ COMPAT53_API void lua_copy (lua_State *L, int from, int to);
119#define lua_len COMPAT53_CONCAT(COMPAT53_PREFIX, _len) 119#define lua_len COMPAT53_CONCAT(COMPAT53_PREFIX, _len)
120COMPAT53_API void lua_len (lua_State *L, int i); 120COMPAT53_API void lua_len (lua_State *L, int i);
121 121
122#define lua_pushstring(L, s) \
123 (lua_pushstring(L, (s)), lua_tostring(L, -1))
124
122#ifndef luaL_newlibtable 125#ifndef luaL_newlibtable
123# define luaL_newlibtable(L, l) \ 126# define luaL_newlibtable(L, l) \
124 (lua_createtable(L, 0, sizeof(l)/sizeof(*(l))-1)) 127 (lua_createtable(L, 0, sizeof(l)/sizeof(*(l))-1))