From 856bcfe2934237011984fab0bc69800a7c25c34b Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Tue, 14 Jun 2016 13:48:33 +0200 Subject: [PATCH] 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 --- 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 e156d46e..8f0e74f9 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 65cd2352..9cc2022c 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