Commit Graph

8 Commits

Author SHA1 Message Date
William S Fulton 53f4751ffa Fix undefined behaviour in directorout typemaps for void * and const char *&
if the same wrapped function is called more than once. Note that using returning
pointers in directors is still full of traps and not recommended. As such,
warning SWIGWARN_TYPEMAP_DIRECTOROUT_PTR (473) continues to be issued.

The debug Python interpreter failed 3 director testcases which have been
modified in this patch to work around unrecommended director usage
returning from director methods. These are C strings and std::string_view.

A Pyton reference count leak is chosen over undefined behaviour for
returning std::string_view.
2025-05-14 22:10:39 +01:00
William S Fulton cf8788c411 Update Python tests to not use flatstaticmethod access
Use Python class staticmethod syntax to access C++ static member functions,
such as Klass.memberfunction, instead of Klass_memberfunction.
Examples and test-suite changes in preparation for issue #2137.
2022-01-14 22:48:11 +00:00
William S Fulton d4ffa46f41 Convert python tests using 2to3
These tests were converted using 2to3 and should be valid using
Python 2.7 and Python 3+.
2020-08-15 00:16:04 +01:00
Jon Schlueter b77f3afafb autopep8 cleanup of Examples/test-suite/python
automated cleanup of python pep8 whitespace compliance
2015-05-08 21:35:52 -04:00
Marcelo Matus 26d42ec95d fixes for python 2.1
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8877 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-02-23 09:08:49 +00:00
Marcelo Matus 0994c45ede add another case
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7858 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-11-21 20:34:43 +00:00
Marcelo Matus 4756a8628c add another nested case
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7740 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-26 14:12:11 +00:00
Marcelo Matus 0f19564193 Fixes to support protected members with director, proper virtual member recognition and support of the nodirector feature
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5485 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-05 01:59:28 +00:00