aboutsummaryrefslogtreecommitdiff
path: root/c-api
diff options
context:
space:
mode:
authorPhilipp Janda <siffiejoe@gmx.net>2017-08-27 10:25:10 +0200
committerPhilipp Janda <siffiejoe@gmx.net>2017-08-27 10:25:10 +0200
commit4e54e82dd903b4f7b17bb242e2b9a190b2de3598 (patch)
treee416e3678df7dd461fda399afb39b10c98a262eb /c-api
parent8b399a1c21ec80b405f1aadeac01d7230922f3b0 (diff)
downloadlua-compat-5.3-4e54e82dd903b4f7b17bb242e2b9a190b2de3598.tar.gz
lua-compat-5.3-4e54e82dd903b4f7b17bb242e2b9a190b2de3598.tar.bz2
lua-compat-5.3-4e54e82dd903b4f7b17bb242e2b9a190b2de3598.zip
Handle lua_pushlstring edge case for Lua 5.2 too.
Diffstat (limited to 'c-api')
-rw-r--r--c-api/compat-5.3.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/c-api/compat-5.3.h b/c-api/compat-5.3.h
index 7dd77c6..3694df1 100644
--- a/c-api/compat-5.3.h
+++ b/c-api/compat-5.3.h
@@ -316,6 +316,9 @@ COMPAT53_API void luaL_requiref (lua_State *L, const char *modname,
316#define lua_getuservalue(L, i) \ 316#define lua_getuservalue(L, i) \
317 (lua_getuservalue(L, i), lua_type(L, -1)) 317 (lua_getuservalue(L, i), lua_type(L, -1))
318 318
319#define lua_pushlstring(L, s, len) \
320 (((len) == 0) ? lua_pushlstring(L, "", 0) : lua_pushlstring(L, (s), (len)))
321
319#define lua_rawgetp(L, i, p) \ 322#define lua_rawgetp(L, i, p) \
320 (lua_rawgetp(L, i, p), lua_type(L, -1)) 323 (lua_rawgetp(L, i, p), lua_type(L, -1))
321 324