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:
William S Fulton 2003-02-07 22:08:50 +00:00
commit 12edcac7ae

View file

@ -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.