You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.7 KiB
65 lines
1.7 KiB
12 years ago
|
commit e8e378f7e12f1a755a0912dff15e9f84ad8dbd7f
|
||
|
Author: Weng Xuetian <wengxt@gmail.com>
|
||
|
Date: Mon May 7 14:06:25 2012 +0800
|
||
|
|
||
|
fix compile
|
||
|
|
||
|
diff --git a/src/module/lua/luawrap.c b/src/module/lua/luawrap.c
|
||
|
index 67883a7..417a1c9 100644
|
||
|
--- a/src/module/lua/luawrap.c
|
||
|
+++ b/src/module/lua/luawrap.c
|
||
|
@@ -58,13 +58,13 @@ typedef struct _ConverterItem {
|
||
|
UT_hash_handle hh;
|
||
|
} ConverterItem;
|
||
|
|
||
|
-typedef struct _LuaExtension {
|
||
|
+struct _LuaExtension {
|
||
|
char *name;
|
||
|
lua_State *lua;
|
||
|
UT_hash_handle hh;
|
||
|
-} LuaExtension;
|
||
|
+};
|
||
|
|
||
|
-typedef struct _LuaModule {
|
||
|
+struct _LuaModule {
|
||
|
FcitxInstance *fcitx;
|
||
|
LuaExtension *extensions;
|
||
|
CommandItem *commands;
|
||
|
@@ -73,7 +73,7 @@ typedef struct _LuaModule {
|
||
|
ConverterItem *converters;
|
||
|
ConverterItem *current_converter;
|
||
|
size_t shortest_input_trigger_key_length;
|
||
|
-} LuaModule;
|
||
|
+};
|
||
|
|
||
|
typedef void (*LuaResultFn)(LuaModule *luamodule, const char *in, const char *out);
|
||
|
|
||
|
diff --git a/src/module/lua/luawrap.h b/src/module/lua/luawrap.h
|
||
|
index 152d835..592b275 100644
|
||
|
--- a/src/module/lua/luawrap.h
|
||
|
+++ b/src/module/lua/luawrap.h
|
||
|
@@ -21,18 +21,18 @@
|
||
|
#ifndef _LUA_WRAP_H_
|
||
|
#define _LUA_WRAP_H_
|
||
|
|
||
|
-typedef struct lua_State lua_State;
|
||
|
-typedef struct _LuaModule LuaModule;
|
||
|
-typedef struct _LuaExtension LuaExtension;
|
||
|
-typedef struct _FcitxInstance FcitxInstance;
|
||
|
+#include <lua.h>
|
||
|
|
||
|
typedef struct _LuaResultItem {
|
||
|
char *result;
|
||
|
char *help;
|
||
|
} LuaResultItem;
|
||
|
|
||
|
+typedef struct _LuaModule LuaModule;
|
||
|
+typedef struct _LuaExtension LuaExtension;
|
||
|
+
|
||
|
// alloc/free luamodule
|
||
|
-LuaModule * LuaModuleAlloc(FcitxInstance *fcitx);
|
||
|
+LuaModule * LuaModuleAlloc(struct _FcitxInstance *fcitx);
|
||
|
void LuaModuleFree(LuaModule *luamodule);
|
||
|
FcitxInstance *GetFcitx(LuaModule *luamodule);
|
||
|
|