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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lua/lua-plugin.c b/lua/lua-plugin.c
index 5ccb837..39b32f3 100644
--- a/lua/lua-plugin.c
+++ b/lua/lua-plugin.c
@@ -25,13 +25,15 @@
#include "lua-plugin.h"
+#ifndef lua_objlen
+#define lua_objlen lua_rawlen
+#endif
+
#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))