python: Wrap file-like objects on demand.
authorJustus Winter <justus@g10code.com>
Mon, 6 Jun 2016 11:11:15 +0000 (13:11 +0200)
committerJustus Winter <justus@g10code.com>
Mon, 6 Jun 2016 12:16:04 +0000 (14:16 +0200)
commit8196edf9ca5c8f2f02553e7f22d9c79dbd229882
treed3bacbbbe7f72ba90bbe2715b5a87acac6871445
parent26c3accc95ab77ddbe60db822e2938ad5f480d41
python: Wrap file-like objects on demand.

* lang/python/gpgme.i (gpgme_data_t): Use new function to create
wrapper objects if necessary, and deallocate them after the function
call.
* lang/python/helpers.c (object_to_gpgme_data_t): New function.
* lang/python/helpers.h (object_to_gpgme_data_t): New prototype.
* lang/python/tests/Makefile.am (pytests): Add new test.
* lang/python/tests/t-idiomatic.py: New file.

Signed-off-by: Justus Winter <justus@g10code.com>
lang/python/gpgme.i
lang/python/helpers.c
lang/python/helpers.h
lang/python/tests/Makefile.am
lang/python/tests/t-idiomatic.py [new file with mode: 0755]