diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2021-04-24 10:38:50 +0100 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2021-04-26 22:32:52 +0100 |
commit | 13158bda9a1da399d10bf0761749a2cf448d9589 (patch) | |
tree | 3f79093721117d4b02d3b82a242836ccca917621 /Lib/lua | |
parent | abcae7c68b2ab456ae19b23a1ab969be184f4439 (diff) | |
download | swig-13158bda9a1da399d10bf0761749a2cf448d9589.tar.gz |
Member function pointer typemap tweaks
Use sizeof variable name rather than variable type.
Workaround Visual C++ unable to parse some complex C++11 types, such as
sizeof(short (Funcs::*)(bool) const &&)
Diffstat (limited to 'Lib/lua')
-rw-r--r-- | Lib/lua/luatypemaps.swg | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/lua/luatypemaps.swg b/Lib/lua/luatypemaps.swg index 8959f201e..6c92e3b59 100644 --- a/Lib/lua/luatypemaps.swg +++ b/Lib/lua/luatypemaps.swg @@ -237,13 +237,13 @@ $1=($1_ltype)&temp;%} // therefore a special wrapping functions SWIG_ConvertMember() & SWIG_NewMemberObj() were written %typemap(in,checkfn="lua_isuserdata") SWIGTYPE (CLASS::*) %{ - if (!SWIG_IsOK(SWIG_ConvertMember(L,$input,(void*)(&$1),sizeof($type),$descriptor))) + if (!SWIG_IsOK(SWIG_ConvertMember(L,$input,(void*)(&$1),sizeof($1),$descriptor))) SWIG_fail_ptr("$symname",$argnum,$descriptor); %} %typemap(out) SWIGTYPE (CLASS::*) -%{ - SWIG_NewMemberObj(L,(void*)(&$1),sizeof($type),$descriptor); SWIG_arg++; +%{ + SWIG_NewMemberObj(L,(void*)(&$1),sizeof($1),$descriptor); SWIG_arg++; %} |