Fix Python directorin typemap for PyObject *

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12760 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2011-07-16 14:43:04 +00:00
parent e167400a29
commit ff6b144f30
4 changed files with 24 additions and 2 deletions

View File

@ -5,11 +5,14 @@ See the RELEASENOTES file for a summary of changes in each release.
Version 2.0.5 (in progress)
===========================
2011-07-16: wsfulton
[python] Fix director typemap using PyObject *.
2011-07-13: szager
[python] Add all template parameters to map support code in std_map.i
2011-07-13: szager
Fix for bug 3324753: %rename member variables with -builtin.
[python] Fix for bug 3324753: %rename member variables with -builtin.
2011-07-01: wsfulton
Fix some scope and symbol lookup problems when template default parameters are being

View File

@ -59,6 +59,7 @@ CPP_TEST_CASES += \
primitive_types \
python_abstractbase \
python_append \
python_director \
python_nondynamic \
python_overload_simple_cast \
python_richcompare \

View File

@ -0,0 +1,18 @@
%module(directors="1") python_director
%feature("director");
%inline %{
class IFactoryFuncs {
public:
IFactoryFuncs() {}
virtual ~IFactoryFuncs() {}
virtual PyObject * process(PyObject *pyobj) {
return pyobj;
}
void process_again(const PyObject *& pyobj) {
}
};
%}

View File

@ -30,7 +30,7 @@
#if defined(SWIG_DIRECTOR_TYPEMAPS)
%typemap(directorin) SWIG_Object "$input = $1_name";
%typemap(directorin) SWIG_Object "$input = $1_name;";
%typemap(directorout) SWIG_Object "$result = $input;";
#endif /* SWIG_DIRECTOR_TYPEMAPS */