diff --git a/SWIG/Examples/test-suite/director_string.i b/SWIG/Examples/test-suite/director_string.i index c815375e3..30ae20ce3 100644 --- a/SWIG/Examples/test-suite/director_string.i +++ b/SWIG/Examples/test-suite/director_string.i @@ -35,6 +35,13 @@ struct A { return get(n); } std::vector m_strings; + + + virtual void process_text(const char *text) + { + } + + void call_process_func() { process_text("hello"); } }; %} diff --git a/SWIG/Examples/test-suite/python/director_string_runme.py b/SWIG/Examples/test-suite/python/director_string_runme.py index d30cddbb7..6b225df33 100644 --- a/SWIG/Examples/test-suite/python/director_string_runme.py +++ b/SWIG/Examples/test-suite/python/director_string_runme.py @@ -6,6 +6,9 @@ class B(A): def get_first(self): return A.get_first(self) + " world!" + + def process_text(self, string): + self.smem = "hello" @@ -15,3 +18,11 @@ b.get(0) if b.get_first() != "hello world!": print b.get_first() raise RuntimeError + + +b.call_process_func() + +if b.smem != "hello": + print smem + raise RuntimeError +