diff options
| author | Peng Wu <alexepico@gmail.com> | 2013-07-31 10:53:14 +0800 |
|---|---|---|
| committer | Peng Wu <alexepico@gmail.com> | 2013-07-31 11:01:29 +0800 |
| commit | c42d0a870697e95301deabe0bcb770a68649c81d (patch) | |
| tree | 6f4f897cd7a28b75a06085d60e94438bbc1a203e /lua/lua-plugin.c | |
| parent | 9ef836117508d9c0c938f57a5ffa5ffca7eb2e7b (diff) | |
| download | ibus-libpinyin-c42d0a870697e95301deabe0bcb770a68649c81d.tar.gz ibus-libpinyin-c42d0a870697e95301deabe0bcb770a68649c81d.tar.xz ibus-libpinyin-c42d0a870697e95301deabe0bcb770a68649c81d.zip | |
fixes lua 5.2 compile
Diffstat (limited to 'lua/lua-plugin.c')
| -rw-r--r-- | lua/lua-plugin.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lua/lua-plugin.c b/lua/lua-plugin.c index 9fd36fb..5ccb837 100644 --- a/lua/lua-plugin.c +++ b/lua/lua-plugin.c @@ -25,6 +25,15 @@ #include "lua-plugin.h" +#if LUA_VERSION_NUM >= 502 +/* ugly hack for lua 5.2 */ + +#define lua_open luaL_newstate + +#define lua_objlen lua_rawlen + +#endif + #define IBUS_ENGINE_PLUGIN_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), IBUS_TYPE_ENGINE_PLUGIN, IBusEnginePluginPrivate)) struct _IBusEnginePluginPrivate{ |
