Fix so that C++ code is not generated for C wrappers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8361 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8c6ffe1de8
commit
ee8bc64a74
2 changed files with 3 additions and 2 deletions
|
|
@ -230,8 +230,9 @@ PySwigClientData_New(PyObject* obj)
|
||||||
data->destroy = 0;
|
data->destroy = 0;
|
||||||
}
|
}
|
||||||
if (data->destroy) {
|
if (data->destroy) {
|
||||||
|
int flags;
|
||||||
Py_INCREF(data->destroy);
|
Py_INCREF(data->destroy);
|
||||||
int flags = PyCFunction_GET_FLAGS(data->destroy);
|
flags = PyCFunction_GET_FLAGS(data->destroy);
|
||||||
#ifdef METH_O
|
#ifdef METH_O
|
||||||
data->delargs = !(flags & (METH_O));
|
data->delargs = !(flags & (METH_O));
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,7 @@
|
||||||
/* typecheck */
|
/* typecheck */
|
||||||
|
|
||||||
%define %value_typecheck_typemap(check,asval_meth,frag,Type...)
|
%define %value_typecheck_typemap(check,asval_meth,frag,Type...)
|
||||||
%typemap(typecheck,noblock=1,precedence=check,fragment=frag) Type, const Type& {
|
%typemap(typecheck,precedence=check,fragment=frag) Type, const Type& {
|
||||||
int res = asval_meth($input, NULL);
|
int res = asval_meth($input, NULL);
|
||||||
$1 = SWIG_CheckState(res);
|
$1 = SWIG_CheckState(res);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue