Fix bug with macro invocation with empty first arg

The first argument was being dropped in this case.
This commit is contained in:
Olly Betts 2017-10-05 11:16:41 +13:00
commit f85d87a64c
4 changed files with 12 additions and 19 deletions

View file

@ -49,12 +49,10 @@ struct SWIG_null_deleter {
}
// Workaround empty first macro argument bug
#define SWIGEMPTYHACK
// Main user macro for defining shared_ptr typemaps for both const and non-const pointer types
%define %shared_ptr(TYPE...)
%feature("smartptr", noblock=1) TYPE { SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< TYPE > }
SWIG_SHARED_PTR_TYPEMAPS(SWIGEMPTYHACK, TYPE)
SWIG_SHARED_PTR_TYPEMAPS(, TYPE)
SWIG_SHARED_PTR_TYPEMAPS(const, TYPE)
%enddef