Home GnuPG
Diffusion GPGME a324d0cffe93

python: Make result objects more robust.
a324d0cffe93Unpublished

Unpublished Commit ยท Learn More

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

Description

python: Make result objects more robust.

Results returned by the GPGME are fragile, i.e. they are only valid
until the next operation is performed in the context.

We cannot arbitrarily constrain the lifetime of Python objects, we
therefore create deep copies of the results.

  • lang/python/gpgme.i (gpgme_tofu_info_t): Turn these into a list.

(gpgme_*_result_t): Create deep copies of these objects.

  • lang/python/helpers.c (pygpgme_wrap_fragile_result): New function.
  • lang/python/helpers.h (pygpgme_wrap_fragile_result): New prototype.
  • lang/python/pyme/results.py: New file.
  • Signed-off-by: Justus Winter <justus@g10code.com>

Details

Provenance
justusAuthored on Jun 14 2016, 5:33 PM
Parents
rM856bcfe29342: python: Avoid creating SWIG proxy classes.
Branches
Unknown
Tags
Unknown

Event Timeline

Justus Winter <justus@g10code.com> committed rMa324d0cffe93: python: Make result objects more robust. (authored by Justus Winter <justus@g10code.com>).Jun 16 2016, 2:19 PM