summaryrefslogtreecommitdiffstats
path: root/lua/lua-plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'lua/lua-plugin.c')
-rw-r--r--lua/lua-plugin.c9
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{