Home GnuPG
Diffusion GPGME 2ae847c02731

python: Implement data callbacks.
2ae847c02731Unpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

python: Implement data callbacks.

* lang/python/gpgme.i (object_to_gpgme_t): Set exception on error.
* lang/python/helpers.c (pyDataReadCb): New function.
(pyDataWriteCb): Likewise.
(pyDataSeekCb): Likewise.
(pyDataReleaseCb): Likewise.
(pygpgme_data_new_from_cbs): Likewise.
* lang/python/helpers.h (pygpgme_data_new_from_cbs): New prototype.
* lang/python/pyme/core.py (Data.__init__): Fix docstring, fix read
callbacks.
(Data.__del__): Fix read callbacks.
(Data._free_readcb): Drop function.
(Data._free_datacbs): New function.
(Data.new_from_cbs): Fix setting the callbacks.
(Data.write): Raise stashed exceptions.
(Data.read): Likewise.
* lang/python/tests/t-callbacks.py: Test new functionality.
* lang/python/tests/t-data.py: Likewise.
  • Signed-off-by: Justus Winter <justus@gnupg.org>

Details

Provenance
justusAuthored on May 27 2016, 2:04 PM
Parents
rMebfe2300c33a: python: Fix object deallocation.
Branches
Unknown
Tags
Unknown

Event Timeline

Justus Winter <justus@gnupg.org> committed rM2ae847c02731: python: Implement data callbacks. (authored by Justus Winter <justus@gnupg.org>).May 27 2016, 2:04 PM