diff options
author | Peng Wu <alexepico@gmail.com> | 2018-06-15 11:36:12 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2018-06-15 11:36:12 +0800 |
commit | 766a1322395e32286930a62b9f66033a0d8d637c (patch) | |
tree | 7de09b05eba63d1c700339df8c5262a243c98dff /lua | |
parent | 89e6d4c522217278ac24d5f4cfc38162a267c9a3 (diff) | |
download | ibus-libpinyin-766a1322395e32286930a62b9f66033a0d8d637c.tar.gz ibus-libpinyin-766a1322395e32286930a62b9f66033a0d8d637c.tar.xz ibus-libpinyin-766a1322395e32286930a62b9f66033a0d8d637c.zip |
fixes lua memory leak
Diffstat (limited to 'lua')
-rw-r--r-- | lua/lua-plugin.c | 2 | ||||
-rw-r--r-- | lua/lua-plugin.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lua/lua-plugin.c b/lua/lua-plugin.c index 2a193f3..167404c 100644 --- a/lua/lua-plugin.c +++ b/lua/lua-plugin.c @@ -416,7 +416,7 @@ static const lua_command_candidate_t * ibus_engine_plugin_get_candidate(lua_Stat /** * retrieve the first string value. (value has been copied.) */ -const char * ibus_engine_plugin_get_first_result(IBusEnginePlugin * plugin){ +gchar * ibus_engine_plugin_get_first_result(IBusEnginePlugin * plugin){ IBusEnginePluginPrivate * priv = IBUS_ENGINE_PLUGIN_GET_PRIVATE(plugin); const char * result = NULL; int type; lua_State * L = priv->L; diff --git a/lua/lua-plugin.h b/lua/lua-plugin.h index fb5f5b9..ebb2b2a 100644 --- a/lua/lua-plugin.h +++ b/lua/lua-plugin.h @@ -174,7 +174,7 @@ int ibus_engine_plugin_call(IBusEnginePlugin * plugin, const char * lua_function /** * retrieve the first string value. (value has been copied.) */ -const char * ibus_engine_plugin_get_first_result(IBusEnginePlugin * plugin); +gchar * ibus_engine_plugin_get_first_result(IBusEnginePlugin * plugin); /** * retrieve the retval string value. (value has been copied.) |