diff options
author | 2010-10-18 18:34:12 -0400 | |
---|---|---|
committer | 2010-10-18 18:34:12 -0400 | |
commit | d77271ea793a3962f4a90e81e15931810ceb7d22 (patch) | |
tree | 74fa0c9956dd77ef15f22300b5ca220636384b92 | |
parent | bc4c62a19864935743e6100ac358dcc44b0d101c (diff) | |
download | textadept-d77271ea793a3962f4a90e81e15931810ceb7d22.tar.gz textadept-d77271ea793a3962f4a90e81e15931810ceb7d22.zip |
Use luaL_checkstring for Scintilla string parameters; src/lua_interface.c
-rw-r--r-- | src/lua_interface.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua_interface.c b/src/lua_interface.c index 8a996e70..214f1f1c 100644 --- a/src/lua_interface.c +++ b/src/lua_interface.c @@ -576,7 +576,7 @@ GtkWidget *l_create_gtkmenu(lua_State *lua, GCallback callback, int submenu) { */ static long l_toscintillaparam(lua_State *lua, int type, int *arg_idx) { if (type == tSTRING) - return (long)lua_tostring(lua, (*arg_idx)++); + return (long)luaL_checkstring(lua, (*arg_idx)++); else if (type == tBOOL) return lua_toboolean(lua, (*arg_idx)++); else if (type == tKEYMOD) { @@ -723,7 +723,7 @@ static int l_call_scintilla(lua_State *lua, GtkWidget *editor, int msg, // Set the w and l parameters appropriately for Scintilla. if (p1_type == tLENGTH && p2_type == tSTRING) { params[0] = (long)lua_strlen(lua, arg); - params[1] = (long)lua_tostring(lua, arg); + params[1] = (long)luaL_checkstring(lua, arg); params_needed = 0; } else if (p2_type == tSTRINGRESULT) { string_return = TRUE; |