[Pkg-gnupg-commit] [gpgme] 176/412: python: Avoid creating SWIG proxy classes.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Thu Sep 22 21:26:42 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gpgme.

commit 856bcfe2934237011984fab0bc69800a7c25c34b
Author: Justus Winter <justus at g10code.com>
Date:   Tue Jun 14 13:48:33 2016 +0200

    python: Avoid creating SWIG proxy classes.
    
    * lang/python/Makefile.am (gpgme_wrap.c): Use '-builtin' to make SWIG
    generate builtin types for c types.
    * lang/python/gpgme.i (pygpgme_wrap_gpgme_data_t): Adapt slightly.
    
    Signed-off-by: Justus Winter <justus at g10code.com>
---
 lang/python/Makefile.am | 2 +-
 lang/python/gpgme.i     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
index e156d46..8f0e74f 100644
--- a/lang/python/Makefile.am
+++ b/lang/python/Makefile.am
@@ -40,7 +40,7 @@ errors.i:
 	  `$(GPG_ERROR_CONFIG) --prefix`/include/gpg-error.h >$@
 
 gpgme_wrap.c pyme/pygpgme.py: gpgme.i errors.i gpgme.h copystamp
-	$(SWIG) -python -py3 $(SWIGOPT) \
+	$(SWIG) -python -py3 -builtin $(SWIGOPT) \
 	  -o $(builddir)/gpgme_wrap.c -outdir $(builddir)/pyme \
 	  $<
 
diff --git a/lang/python/gpgme.i b/lang/python/gpgme.i
index 65cd235..9cc2022 100644
--- a/lang/python/gpgme.i
+++ b/lang/python/gpgme.i
@@ -373,7 +373,7 @@ FILE *fdopen(int fildes, const char *mode);
 PyObject *
 pygpgme_wrap_gpgme_data_t(gpgme_data_t data)
 {
-  return SWIG_NewPointerObj(data, SWIGTYPE_p_gpgme_data, 0);
+  return SWIG_Python_NewPointerObj(NULL, data, SWIGTYPE_p_gpgme_data, 0);
 }
 
 gpgme_ctx_t

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gpgme.git



More information about the Pkg-gnupg-commit mailing list