diff options
| -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 |
