aboutsummaryrefslogtreecommitdiffstats
path: root/src/compat52.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/compat52.h')
-rw-r--r--src/compat52.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compat52.h b/src/compat52.h
index 96ec9b2..e64edd9 100644
--- a/src/compat52.h
+++ b/src/compat52.h
@@ -149,4 +149,12 @@ typedef struct luaL_Stream {
#define lua_rawlen(...) lua_objlen(__VA_ARGS__)
+#define lua_pushstring(...) lua52_pushstring(__VA_ARGS__)
+
+static const char *lua52_pushstring(lua_State *L, const char *s) {
+ lua_pushstring(L, s);
+ return lua_tostring(L, -1);
+} /* lua52_pushstring() */
+
+
#endif /* LUA_VERSION_NUM < 502 */