lua: push characters as unformatted 1-character strings
Since Lua 5.3 the "%c" format character in lua_pushfstring will produce the string "<\XXX>" (XXX being a decimal code sequence) when given unprintable characters. Use lua_pushlstring instead to reproduce the old behavior.
This commit is contained in:
parent
8208d12aa5
commit
ca208cfe35
6 changed files with 37 additions and 4 deletions
|
|
@ -185,7 +185,7 @@ use %include <std_except.i> instead
|
|||
|
||||
// char is changed to a string
|
||||
%typemap(throws) char
|
||||
%{lua_pushfstring(L,"%c",$1);SWIG_fail;%}
|
||||
%{lua_pushlstring(L,&$1,1);SWIG_fail;%}
|
||||
|
||||
/*
|
||||
Throwing object is a serious problem:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue