diff options
author | Johannes Dewender <rpm@JonnyJD.net> | 2013-04-04 19:11:48 +0200 |
---|---|---|
committer | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2014-06-11 17:48:03 +0300 |
commit | c782338095e10942520dabd23fe4bd74aead0c43 (patch) | |
tree | 972908885349bdf99deb8ed17e00a339f048d614 /rpmio | |
parent | 6625393d805aa8790a6b9b50102ad158ebf0a093 (diff) | |
download | librpm-tizen-c782338095e10942520dabd23fe4bd74aead0c43.tar.gz librpm-tizen-c782338095e10942520dabd23fe4bd74aead0c43.tar.bz2 librpm-tizen-c782338095e10942520dabd23fe4bd74aead0c43.zip |
Finish lua 5.2 support, trac #865
Lua52 support was started with ac959fed0082cb253d45c7a04866e8654e962442.
Compilation tested with Lua 5.2.1 and Lua 5.1.5.
The short typerror() snippet is taken from luaL_typerror in Lua 5.1.5
(MIT license)
Signed-off-by: Johannes Dewender <rpm@JonnyJD.net>
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Diffstat (limited to 'rpmio')
-rw-r--r-- | rpmio/rpmlua.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rpmio/rpmlua.c b/rpmio/rpmlua.c index 53c0cf908..96f4dc1ca 100644 --- a/rpmio/rpmlua.c +++ b/rpmio/rpmlua.c @@ -7,14 +7,22 @@ #include <lposix.h> #include <lrexlib.h> +/* replaced in 5.1 */ #ifndef lua_open #define lua_open() luaL_newstate() #endif +/* defined as lua_objlen in 5.1 */ #ifndef lua_strlen #define lua_strlen(L,i) lua_rawlen(L, (i)) #endif +/* deprecated in 5.1, defined as lua_objlen in 5.1 */ +#ifndef luaL_getn +#define luaL_getn(L,i) ((int)lua_rawlen(L, i)) +#endif + +/* define added in 5.2 */ #ifndef lua_pushglobaltable #define lua_pushglobaltable(L) lua_pushvalue(L, LUA_GLOBALSINDEX) #endif |