mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpgscm: Make the compile-hook configurable.
* tests/gpgscm/scheme-private.h (struct scheme): Make field 'COMPILE_HOOK' optional. * tests/gpgscm/scheme.c (opexe_0): Fix guard. (scheme_init_custom_alloc): Conditionally initialize 'COMPILE_HOOK'. * tests/gpgscm/scheme.h (USE_COMPILE_HOOK): Define to 1 by default. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
9ee184bc0a
commit
568cfcde45
3 changed files with 12 additions and 1 deletions
|
@ -2688,7 +2688,7 @@ static pointer opexe_0(scheme *sc, enum scheme_opcodes op) {
|
|||
sc->code = sc->value;
|
||||
s_goto(sc,OP_EVAL);
|
||||
|
||||
#if 1
|
||||
#if USE_COMPILE_HOOK
|
||||
case OP_LAMBDA: /* lambda */
|
||||
/* If the hook is defined, apply it to sc->code, otherwise
|
||||
set sc->value fall through */
|
||||
|
@ -4737,7 +4737,9 @@ int scheme_init_custom_alloc(scheme *sc, func_alloc malloc, func_dealloc free) {
|
|||
sc->COLON_HOOK = mk_symbol(sc,"*colon-hook*");
|
||||
sc->ERROR_HOOK = mk_symbol(sc, "*error-hook*");
|
||||
sc->SHARP_HOOK = mk_symbol(sc, "*sharp-hook*");
|
||||
#if USE_COMPILE_HOOK
|
||||
sc->COMPILE_HOOK = mk_symbol(sc, "*compile-hook*");
|
||||
#endif
|
||||
|
||||
return !sc->no_memory;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue