diff options
| author | TitanSnow <[email protected]> | 2017-05-10 15:02:52 +0800 |
|---|---|---|
| committer | TitanSnow <[email protected]> | 2017-05-10 15:02:52 +0800 |
| commit | 067d960804f438b5759f6b094a929a94b20b4deb (patch) | |
| tree | 0cf1a94c7ccfba317381e24257959a9b383c0b40 | |
| parent | 48f6176b8bf318ab6e03321168b36352a5763ad7 (diff) | |
fix self-build
| -rw-r--r-- | core/src/xmake/readline/add_history.c | 4 | ||||
| -rw-r--r-- | core/src/xmake/readline/clear_history.c | 4 | ||||
| -rw-r--r-- | core/src/xmake/readline/get_history_state.c | 4 | ||||
| -rw-r--r-- | core/src/xmake/readline/readline.c | 6 |
4 files changed, 9 insertions, 9 deletions
diff --git a/core/src/xmake/readline/add_history.c b/core/src/xmake/readline/add_history.c index 1b466ca6a..57f947d0c 100644 --- a/core/src/xmake/readline/add_history.c +++ b/core/src/xmake/readline/add_history.c @@ -23,8 +23,6 @@ * */ -#ifdef XM_CONFIG_API_HAVE_READLINE - /* ////////////////////////////////////////////////////////////////////////////////////// * trace */ @@ -36,6 +34,8 @@ */ #include "prefix.h" +#ifdef XM_CONFIG_API_HAVE_READLINE + /* ////////////////////////////////////////////////////////////////////////////////////// * implementation */ diff --git a/core/src/xmake/readline/clear_history.c b/core/src/xmake/readline/clear_history.c index fbab27d5b..7517e2e43 100644 --- a/core/src/xmake/readline/clear_history.c +++ b/core/src/xmake/readline/clear_history.c @@ -23,8 +23,6 @@ * */ -#ifdef XM_CONFIG_API_HAVE_READLINE - /* ////////////////////////////////////////////////////////////////////////////////////// * trace */ @@ -36,6 +34,8 @@ */ #include "prefix.h" +#ifdef XM_CONFIG_API_HAVE_READLINE + /* ////////////////////////////////////////////////////////////////////////////////////// * implementation */ diff --git a/core/src/xmake/readline/get_history_state.c b/core/src/xmake/readline/get_history_state.c index 5b2acc4ac..184f0e9fc 100644 --- a/core/src/xmake/readline/get_history_state.c +++ b/core/src/xmake/readline/get_history_state.c @@ -23,8 +23,6 @@ * */ -#ifdef XM_CONFIG_API_HAVE_READLINE - /* ////////////////////////////////////////////////////////////////////////////////////// * trace */ @@ -36,6 +34,8 @@ */ #include "prefix.h" +#ifdef XM_CONFIG_API_HAVE_READLINE + /* ////////////////////////////////////////////////////////////////////////////////////// * implementation */ diff --git a/core/src/xmake/readline/readline.c b/core/src/xmake/readline/readline.c index c0088a582..c52ff02aa 100644 --- a/core/src/xmake/readline/readline.c +++ b/core/src/xmake/readline/readline.c @@ -23,8 +23,6 @@ * */ -#ifdef XM_CONFIG_API_HAVE_READLINE - /* ////////////////////////////////////////////////////////////////////////////////////// * trace */ @@ -36,6 +34,8 @@ */ #include "prefix.h" +#ifdef XM_CONFIG_API_HAVE_READLINE + /* ////////////////////////////////////////////////////////////////////////////////////// * implementation */ @@ -48,7 +48,7 @@ tb_int_t xm_readline_readline(lua_State* lua) // get the prompt tb_char_t const* prompt = tb_null; - if (luaL_typename(lua, 1) != "nil") + if (tb_strcmp("nil", luaL_typename(lua, 1)) != 0) prompt = luaL_checkstring(lua, 1); // call readline |
