diff options
author | Justus Winter <[email protected]> | 2016-11-18 12:23:11 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2016-12-08 16:15:20 +0000 |
commit | fcf5aea44627def43425d03881e20902e7c0331e (patch) | |
tree | a786be767f3e6980e94eb061386204eccde9789f /tests/gpgscm/scheme.h | |
parent | gpg: Fix the fix out-of-bounds access. (diff) | |
download | gnupg-fcf5aea44627def43425d03881e20902e7c0331e.tar.gz gnupg-fcf5aea44627def43425d03881e20902e7c0331e.zip |
gpgscm: Implement tags.
* tests/gpgscm/opdefines.h: Add opcodes to create and retrieve tags.
* tests/gpgscm/scheme.c (T_TAGGED): New macro.
(mk_tagged_value): New function.
(has_tag): Likewise.
(get_tag): Likewise.
(mark): Mark tag.
(opexe_4): Implement new opcodes.
* tests/gpgscm/scheme.h (USE_TAGS): New macro.
--
Tags are similar to property lists, but property lists can only be
attached to symbols. Tags can not be attached to an existing object,
but a tagged copy can be created. Once done, the tag can be
manipulated in constant time.
Using this during parsing will enable us to produce meaningful error
messages.
Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | tests/gpgscm/scheme.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/gpgscm/scheme.h b/tests/gpgscm/scheme.h index 2b5b0665c..5e7d90d90 100644 --- a/tests/gpgscm/scheme.h +++ b/tests/gpgscm/scheme.h @@ -44,6 +44,7 @@ extern "C" { # define USE_DL 0 # define USE_PLIST 0 # define USE_SMALL_INTEGERS 0 +# define USE_TAGS 0 #endif @@ -76,6 +77,11 @@ extern "C" { # define USE_PLIST 0 #endif +/* If set, then every object can be tagged. */ +#ifndef USE_TAGS +# define USE_TAGS 1 +#endif + /* To force system errors through user-defined error handling (see *error-hook*) */ #ifndef USE_ERROR_HOOK # define USE_ERROR_HOOK 1 |