Home GnuPG
Diffusion GPGME d35651917097

python: Call SWIG_NewPointerObj rather than SWIG_Python_NewPointerObj.
d35651917097Unpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

python: Call SWIG_NewPointerObj rather than SWIG_Python_NewPointerObj.

* lang/python/gpgme.i (pygpgme_wrap_gpgme_data_t): Provide a "self"
variable for SWIG_NewPointerObj and call SWIG_NewPointerObj rather than
SWIG_Python_NewPointerObj.

SWIG_Python_NewPointerObj seems to be an implementation detail, because
SWIG's documentation does not mention that function at all. In fact,
SWIG_NewPointerObj is a call to SWIG_Python_NewPointerObj with the first
parameter being either NULL or the "self" variable, depending on whether
SWIG is called with the -builtin flag. So far, the first parameter was
hard-coded to NULL. This change also hard-codes it to NULL but makes
it more explicit. The benefit is that the documented function is being
used and that compilation works regardless of the -builtin flag.

Partially reverts: 856bcfe2934237011984fab0bc69800a7c25c34b

  • Signed-off-by: Tobias Mueller <muelli@cryptobitch.de>

Details

Provenance
4tmuelleAuthored on Dec 20 2016, 6:01 PM
justusCommitted on Feb 14 2017, 11:19 AM
Parents
rMd184dbbba898: python: Conditionally provide py3 argument to SWIG
Branches
Unknown
Tags
Unknown

Event Timeline

Justus Winter <justus@g10code.com> committed rMd35651917097: python: Call SWIG_NewPointerObj rather than SWIG_Python_NewPointerObj. (authored by Tobias Mueller <muelli@cryptobitch.de>).Feb 14 2017, 11:19 AM