gpgscm: Add flags to the interpreter.
authorJustus Winter <justus@g10code.com>
Mon, 21 Nov 2016 11:38:44 +0000 (12:38 +0100)
committerJustus Winter <justus@g10code.com>
Thu, 8 Dec 2016 16:15:20 +0000 (17:15 +0100)
commita4a69163d9d7e4d9f3339eb5cda0afb947180b26
tree49eba0c7ef9dd7262f19dd57318942d6b38ef3a3
parentfcf5aea44627def43425d03881e20902e7c0331e
gpgscm: Add flags to the interpreter.

* tests/gpgscm/scheme-private.h (struct scheme): Add field 'flags'.
* tests/gpgscm/scheme.c (S_OP_MASK): New macro.
(S_FLAG_MASK, s_set_flag, s_clear_flag, s_get_flag): Likewise.
(_s_return): Unpack the encoded opcode and flags.
(s_save): Encode the flags along with the opcode.  Use normal
integers to encode the result.
(scheme_init_custom_alloc): Initialize 'op' and 'flags'.

Signed-off-by: Justus Winter <justus@g10code.com>
tests/gpgscm/scheme-private.h
tests/gpgscm/scheme.c