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