projects
/
platform
/
upstream
/
ibus-libpinyin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c6705a7
)
add some check on IME_TRIM_PRECHECK.
author
Peng Wu
<epico@dhcp-65-116.nay.redhat.com>
Mon, 15 Mar 2010 10:00:30 +0000
(18:00 +0800)
committer
Peng Wu
<alexepico@gmail.com>
Wed, 19 May 2010 02:09:31 +0000
(10:09 +0800)
lua/lua-plugin-init.c
patch
|
blob
|
history
diff --git
a/lua/lua-plugin-init.c
b/lua/lua-plugin-init.c
index
7a1562f
..
8469cca
100644
(file)
--- a/
lua/lua-plugin-init.c
+++ b/
lua/lua-plugin-init.c
@@
-57,7
+57,7
@@
static int ime_get_version(lua_State* L){
}
static gboolean ime_is_white_space(const char c){
-
const char *
white_space = " \t\n\r\v\f";
+
static const char * const
white_space = " \t\n\r\v\f";
int i;
size_t len = strlen(white_space);
@@
-69,7
+69,7
@@
static gboolean ime_is_white_space(const char c){
}
#define IME_TRIM_PRECHECK \
- if (NULL == s
){
\
+ if (NULL == s
|| '\0' == s[0]){
\
lua_pushliteral(L, ""); \
return 1; \
}