The only documentation is in the file itself and describes a Python
wrapper around the C function defined here, but digging though the git
history this Python wrapper doesn't seem to have ever actually been
generated by SWIG.
This file was also marked as deprecated in 2005.
Fixes#2390Fixes#2391
* python_subinterpreter_issues:
added comment in CHANGES.current
always get the type_pointer from capsule instead of using a static variable as the value may change after re-initilization/due to subinterpreters
added interpreter_counter to deinitialize only once in case of subinterpreters
Conflicts:
CHANGES.current
Lib/python/pyrun.swg
For implementing full move semantics when passing parameters by value.
Based on SWIGTYPE && and std::unique_ptr typemaps which implement move
semantics.
Added for all languages, but untested for: Go, Ocaml, R, Scilab (and
unlikely to be fully functional for same reasons as for std::unique_ptr
support).
Issue #999
Only use the corecrt.h workaround for #2090 when using
SWIG_PYTHON_INTERPRETER_NO_DEBUG as the problem seems to only
occur when undefining _DEBUG.
Also extend workaround for Visual Studio 2019 version 16.10 and 16.11
as per #2174 (_MSC_VER=1929).
* rvalue-move:
rvalue reference outputs
Remove broken %implicitconv for const SWIGTYPE &&
Remove unnecessary const SWIGTYPE & typemap
Temporarily remove rvalue reference python runtime test
std::auto_ptr emulation fix in test case
Ocaml typemap typo fix
Fix Racket tests using schemerunme directory
Docs on rvalue parameter changes
Test/fixes to handle NULL pointer for unique_ptr/auto_ptr
Octave - SWIG now marshalls a C/C++ NULL pointer into the null matrix, []
Racket - NULL pointer handling
SWIGTYPE && input typemaps now assume object has been moved - Go and OCaml
SWIGTYPE && input typemaps now assume object has been moved
SWIGTYPE && input typemaps now assume object has been moved - Java
Cosmetic stray semi-colon removal after %typemap using quotes
Cosmetic stray semi-colon removal after %typemap
* unique_ptr-inputs:
std::unique_ptr std::auto_ptr tidyup
Add support for std::auto_ptr inputs
Cosmetic formatting and doc updates in std_unique_ptr.i files
Add Perl support for std::unique_ptr inputs
Add Ruby support for std::unique_ptr inputs
Add Python support for std::unique_ptr inputs
Add C# support std::unique_ptr inputs
Java unique_ptr test ownership enhancement to test
Java unique_ptr enhance test for double release
SWIGTYPE && input typemaps now assume object has been moved
Add Java support for std::unique<T> for input parameters.
Closes#692
Conflicts:
CHANGES.current
The directorin typemaps in the director methods now use std::move on the
input parameter when copying the object from the stack to the heap prior
to the callback into the target language, thereby taking advantage of
move semantics if available.
* more_argcargv:
Document argc argv library
argcargv.i cosmetic updates
Typemaps for (int ARGC, char **ARGV) fixup
Fix argcargv.i in Perl5, Tcl, PHP Add missing type map for type check. Add testing of argcargv.i for Perl5, Tcl, PHP and Ruby.
Add Lua test for argcargv.i
Add argcargv.i to more languages: Perl 5, Tcl, PHP
Add argcargv.i to Lua
It is recommended to always define PY_SSIZE_T_CLEAN before including
Python.h. Cf. https://docs.python.org/3/c-api/intro.html
This avoids errors like:
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
* feature/python-builtin-separate-runtime-data:
Rework swig_and_compile_multi_cpp makefile helper
Different capsule names for builtin changes entry
Use different capsule names with and without -builtin
Conflicts:
CHANGES.current
pyabc.i for abstract base classes now supports versions of Python
prior to 3.3 by using the collection module for these older versions.
Python-3.3 and later continue to use the collections.abc module.
The -py3 option no longer has any effect on the %pythonabc feature.
Types generated with and without -builtin are not compatible. Mixing
them in a common type list leads to crashes. Avoid this by using
different capsule names: "type_pointer_capsule" without -builtin and
"type_pointer_capsule_builtin" with.
See #1684
SWIG python objects were being freed after the corresponding SWIG
module information was destroyed in Python 3, causing leaks when as
a result the object destructor could not be invoked. To prevent this
misordering, SWIG python objects now obtain a reference to the
Python capsule wrapping the module information, so that the module
information is correctly destroyed after all SWIG python objects
have been freed (and corresponding destructors invoked).
Fixes#2154Fixes#2208
This is necessary for regex-like renames (where you can't use the #define trick
as is done in many of the %keywordwarn directives). It's now unnecessary to print
the "renaming to '`x`'" code explicitly by the kw.swg files.
The SWIG_PyInstanceMethod_New method is no longer added to wrapped
classes except when it's actually needed, which is when
(!builtin && fastproxy) is true (which it isn't by default).
The SWIG_PyStaticMethod_New method is no longer is now similarly
gated - previously only (fastproxy) was checked.
Finally the C/C++ functions that implement these were always compiled
into the module, but now they're only included if
(!builtin && fastproxy) is true.
Issue noted by vadz in #2190.
This fallback version of PyString_AS_STRING() for Python 3 makes use of
PyUnicode_AS_STRING, but I can find no evidence that ever existed in
Python - all references I've found are to SWIG or SWIG-generated code.
The only uses of PyString_AS_STRING() in SWIG generated code are for
Python 2 #if-branches, so this fallback is never used by SWIG.
Because it doesn't work it can't be usefully used in user interface
files either, so let's remove it to avoid potential user confusion
(such as #987).
Fix access to C++ static member functions using Python class
staticmethod syntax, such as Klass.memberfunction instead of
Klass_memberfunction, when using -fastproxy and -builtin in
combination with %callback.
The docstring containing the callback pointers were not being patched
during module initialisation.
Fixes#2101. There are 3 related changes made here:
1. Move the SWIG_globals() singleton into pyrun from pyint so it
is visible to SWIG_Python_DestroyModule(). The static globals
varlink has been extracted out of the function so that it can
be set to NULL in SWIG_Python_DestroyModule(), which fixes the
issue described in #2101. (Now when the second interpreter
starts up, the Swig_Globals_global pointer will be NULL, so it
knows it has to create a new one.)
2. Remove a Py_DECREF on the globals varlink. The decrement is now
performed by DestroyModule(), so there's no need to do it in
SWIG_init().
3. Fixed similar issue with SWIG_Python_TypeCache().