bool typemap rewrite to keep Visual C++ happy
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4260 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
9c0c370f1b
commit
12edcac7ae
1 changed files with 9 additions and 1 deletions
|
|
@ -84,10 +84,18 @@ INPUT_TYPEMAP(unsigned long, PyInt_AsLong);
|
|||
INPUT_TYPEMAP(unsigned long long, PyLong_AsUnsignedLongLong);
|
||||
INPUT_TYPEMAP(unsigned char, PyInt_AsLong);
|
||||
INPUT_TYPEMAP(signed char, PyInt_AsLong);
|
||||
INPUT_TYPEMAP(bool, PyInt_AsLong);
|
||||
|
||||
#undef INPUT_TYPEMAP
|
||||
|
||||
%typemap(in) bool *INPUT(bool temp), bool &INPUT(bool temp)
|
||||
{
|
||||
temp = PyInt_AsLong($input) ? true : false;
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
$1 = &temp;
|
||||
}
|
||||
%typemap(typecheck) bool *INPUT = bool;
|
||||
%typemap(typecheck) bool &INPUT = bool;
|
||||
|
||||
// OUTPUT typemaps. These typemaps are used for parameters that
|
||||
// are output only. The output value is appended to the result as
|
||||
// a list element.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue