diff options
| author | Peng Wu <epico@dhcp-65-116.nay.redhat.com> | 2010-04-06 13:22:12 +0800 |
|---|---|---|
| committer | Peng Wu <alexepico@gmail.com> | 2010-05-19 10:09:32 +0800 |
| commit | a3987f2e2a8fea3916ee410a3679bdf3d57b4188 (patch) | |
| tree | aad4aee7eca2d5e85301943aa51da167390cfa39 /lua | |
| parent | bfee085f2be86e3bd16a96c8dd70c3cc937852b1 (diff) | |
| download | ibus-libpinyin-a3987f2e2a8fea3916ee410a3679bdf3d57b4188.tar.gz ibus-libpinyin-a3987f2e2a8fea3916ee410a3679bdf3d57b4188.tar.xz ibus-libpinyin-a3987f2e2a8fea3916ee410a3679bdf3d57b4188.zip | |
change ime_join_string implementation.
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lua-plugin-init.c | 4 | ||||
| -rw-r--r-- | lua/test.lua | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lua/lua-plugin-init.c b/lua/lua-plugin-init.c index a59e6f2..4d86332 100644 --- a/lua/lua-plugin-init.c +++ b/lua/lua-plugin-init.c @@ -79,7 +79,7 @@ static int ime_join_string(lua_State* L){ for ( i = 1; i < vec_len; ++i){ lua_pushinteger(L, i); lua_gettable(L, 1); - str = lua_tolstring(L, 3, NULL); + str = luaL_checklstring(L, 3, NULL); luaL_addstring(&buf, str); lua_pop(L, 1); luaL_addstring(&buf, sep); @@ -88,7 +88,7 @@ static int ime_join_string(lua_State* L){ /* add tail of string list */ lua_pushinteger(L, i); lua_gettable(L, 1); - str = lua_tolstring(L, 3, NULL); + str = luaL_checklstring(L, 3, NULL); luaL_addstring(&buf, str); lua_pop(L, 1); /* remove the args. */ diff --git a/lua/test.lua b/lua/test.lua index b0ace98..c901bee 100644 --- a/lua/test.lua +++ b/lua/test.lua @@ -26,5 +26,6 @@ for k,v in pairs(_MAPPING) do end end +-- print(ime.join_string({nil, " "}, ",")); print("test finished..."); |
