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@g10code.com>
This commit is contained in:
Justus Winter 2016-06-14 13:48:33 +02:00
parent 6641c7814b
commit 856bcfe293
2 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ errors.i:
`$(GPG_ERROR_CONFIG) --prefix`/include/gpg-error.h >$@ `$(GPG_ERROR_CONFIG) --prefix`/include/gpg-error.h >$@
gpgme_wrap.c pyme/pygpgme.py: gpgme.i errors.i gpgme.h copystamp 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 \ -o $(builddir)/gpgme_wrap.c -outdir $(builddir)/pyme \
$< $<

View File

@ -373,7 +373,7 @@ FILE *fdopen(int fildes, const char *mode);
PyObject * PyObject *
pygpgme_wrap_gpgme_data_t(gpgme_data_t data) 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 gpgme_ctx_t