[Pkg-gnupg-commit] [gnupg2] 33/132: gpgscm: Remove now obsolete dispatcher function from the opcodes.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed May 17 03:07:39 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gnupg2.
commit e7ed9822e20ee4bbb4cdd9eca8121b4ade87e5ce
Author: Justus Winter <justus at g10code.com>
Date: Wed Mar 29 14:11:58 2017 +0200
gpgscm: Remove now obsolete dispatcher function from the opcodes.
* tests/gpgscm/opdefines.h: Remove now obsolete dispatcher function
from the opcodes.
* tests/gpgscm/scheme-private.h (_OP_DEF): Adapt.
* tests/gpgscm/scheme.c (dispatch_func): Remove type declaration.
(op_code_info): Remove 'func'.
(_OP_DEF): Adapt.
(Eval_Cycle): Always call 'opexe_0'.
Signed-off-by: Justus Winter <justus at g10code.com>
---
tests/gpgscm/opdefines.h | 376 +++++++++++++++++++++---------------------
tests/gpgscm/scheme-private.h | 2 +-
tests/gpgscm/scheme.c | 7 +-
3 files changed, 191 insertions(+), 194 deletions(-)
diff --git a/tests/gpgscm/opdefines.h b/tests/gpgscm/opdefines.h
index 1a5076b..6c53e1f 100644
--- a/tests/gpgscm/opdefines.h
+++ b/tests/gpgscm/opdefines.h
@@ -1,206 +1,206 @@
- _OP_DEF(opexe_0, "load", 1, 1, TST_STRING, OP_LOAD )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_T0LVL )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_T1LVL )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_READ_INTERNAL )
- _OP_DEF(opexe_0, "gensym", 0, 0, 0, OP_GENSYM )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_VALUEPRINT )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_EVAL )
+_OP_DEF("load", 1, 1, TST_STRING, OP_LOAD )
+_OP_DEF(0, 0, 0, 0, OP_T0LVL )
+_OP_DEF(0, 0, 0, 0, OP_T1LVL )
+_OP_DEF(0, 0, 0, 0, OP_READ_INTERNAL )
+_OP_DEF("gensym", 0, 0, 0, OP_GENSYM )
+_OP_DEF(0, 0, 0, 0, OP_VALUEPRINT )
+_OP_DEF(0, 0, 0, 0, OP_EVAL )
#if USE_TRACING
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_REAL_EVAL )
+_OP_DEF(0, 0, 0, 0, OP_REAL_EVAL )
#endif
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_E0ARGS )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_E1ARGS )
+_OP_DEF(0, 0, 0, 0, OP_E0ARGS )
+_OP_DEF(0, 0, 0, 0, OP_E1ARGS )
#if USE_HISTORY
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_CALLSTACK_POP )
+_OP_DEF(0, 0, 0, 0, OP_CALLSTACK_POP )
#endif
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_APPLY_CODE )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_APPLY )
+_OP_DEF(0, 0, 0, 0, OP_APPLY_CODE )
+_OP_DEF(0, 0, 0, 0, OP_APPLY )
#if USE_TRACING
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_REAL_APPLY )
- _OP_DEF(opexe_0, "tracing", 1, 1, TST_NATURAL, OP_TRACING )
+_OP_DEF(0, 0, 0, 0, OP_REAL_APPLY )
+_OP_DEF("tracing", 1, 1, TST_NATURAL, OP_TRACING )
#endif
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_DOMACRO )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_LAMBDA )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_LAMBDA1 )
- _OP_DEF(opexe_0, "make-closure", 1, 2, TST_PAIR TST_ENVIRONMENT, OP_MKCLOSURE )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_QUOTE )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_DEF0 )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_DEF1 )
- _OP_DEF(opexe_0, "defined?", 1, 2, TST_SYMBOL TST_ENVIRONMENT, OP_DEFP )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_BEGIN )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_IF0 )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_IF1 )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_SET0 )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_SET1 )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_LET0 )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_LET1 )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_LET2 )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_LET0AST )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_LET1AST )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_LET2AST )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_LET0REC )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_LET1REC )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_LET2REC )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_COND0 )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_COND1 )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_DELAY )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_AND0 )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_AND1 )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_OR0 )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_OR1 )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_C0STREAM )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_C1STREAM )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_MACRO0 )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_MACRO1 )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_CASE0 )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_CASE1 )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_CASE2 )
- _OP_DEF(opexe_0, "eval", 1, 2, TST_ANY TST_ENVIRONMENT, OP_PEVAL )
- _OP_DEF(opexe_0, "apply", 1, INF_ARG, TST_NONE, OP_PAPPLY )
- _OP_DEF(opexe_0, "call-with-current-continuation", 1, 1, TST_NONE, OP_CONTINUATION )
+_OP_DEF(0, 0, 0, 0, OP_DOMACRO )
+_OP_DEF(0, 0, 0, 0, OP_LAMBDA )
+_OP_DEF(0, 0, 0, 0, OP_LAMBDA1 )
+_OP_DEF("make-closure", 1, 2, TST_PAIR TST_ENVIRONMENT, OP_MKCLOSURE )
+_OP_DEF(0, 0, 0, 0, OP_QUOTE )
+_OP_DEF(0, 0, 0, 0, OP_DEF0 )
+_OP_DEF(0, 0, 0, 0, OP_DEF1 )
+_OP_DEF("defined?", 1, 2, TST_SYMBOL TST_ENVIRONMENT, OP_DEFP )
+_OP_DEF(0, 0, 0, 0, OP_BEGIN )
+_OP_DEF(0, 0, 0, 0, OP_IF0 )
+_OP_DEF(0, 0, 0, 0, OP_IF1 )
+_OP_DEF(0, 0, 0, 0, OP_SET0 )
+_OP_DEF(0, 0, 0, 0, OP_SET1 )
+_OP_DEF(0, 0, 0, 0, OP_LET0 )
+_OP_DEF(0, 0, 0, 0, OP_LET1 )
+_OP_DEF(0, 0, 0, 0, OP_LET2 )
+_OP_DEF(0, 0, 0, 0, OP_LET0AST )
+_OP_DEF(0, 0, 0, 0, OP_LET1AST )
+_OP_DEF(0, 0, 0, 0, OP_LET2AST )
+_OP_DEF(0, 0, 0, 0, OP_LET0REC )
+_OP_DEF(0, 0, 0, 0, OP_LET1REC )
+_OP_DEF(0, 0, 0, 0, OP_LET2REC )
+_OP_DEF(0, 0, 0, 0, OP_COND0 )
+_OP_DEF(0, 0, 0, 0, OP_COND1 )
+_OP_DEF(0, 0, 0, 0, OP_DELAY )
+_OP_DEF(0, 0, 0, 0, OP_AND0 )
+_OP_DEF(0, 0, 0, 0, OP_AND1 )
+_OP_DEF(0, 0, 0, 0, OP_OR0 )
+_OP_DEF(0, 0, 0, 0, OP_OR1 )
+_OP_DEF(0, 0, 0, 0, OP_C0STREAM )
+_OP_DEF(0, 0, 0, 0, OP_C1STREAM )
+_OP_DEF(0, 0, 0, 0, OP_MACRO0 )
+_OP_DEF(0, 0, 0, 0, OP_MACRO1 )
+_OP_DEF(0, 0, 0, 0, OP_CASE0 )
+_OP_DEF(0, 0, 0, 0, OP_CASE1 )
+_OP_DEF(0, 0, 0, 0, OP_CASE2 )
+_OP_DEF("eval", 1, 2, TST_ANY TST_ENVIRONMENT, OP_PEVAL )
+_OP_DEF("apply", 1, INF_ARG, TST_NONE, OP_PAPPLY )
+_OP_DEF("call-with-current-continuation", 1, 1, TST_NONE, OP_CONTINUATION )
#if USE_MATH
- _OP_DEF(opexe_0, "inexact->exact", 1, 1, TST_NUMBER, OP_INEX2EX )
- _OP_DEF(opexe_0, "exp", 1, 1, TST_NUMBER, OP_EXP )
- _OP_DEF(opexe_0, "log", 1, 1, TST_NUMBER, OP_LOG )
- _OP_DEF(opexe_0, "sin", 1, 1, TST_NUMBER, OP_SIN )
- _OP_DEF(opexe_0, "cos", 1, 1, TST_NUMBER, OP_COS )
- _OP_DEF(opexe_0, "tan", 1, 1, TST_NUMBER, OP_TAN )
- _OP_DEF(opexe_0, "asin", 1, 1, TST_NUMBER, OP_ASIN )
- _OP_DEF(opexe_0, "acos", 1, 1, TST_NUMBER, OP_ACOS )
- _OP_DEF(opexe_0, "atan", 1, 2, TST_NUMBER, OP_ATAN )
- _OP_DEF(opexe_0, "sqrt", 1, 1, TST_NUMBER, OP_SQRT )
- _OP_DEF(opexe_0, "expt", 2, 2, TST_NUMBER, OP_EXPT )
- _OP_DEF(opexe_0, "floor", 1, 1, TST_NUMBER, OP_FLOOR )
- _OP_DEF(opexe_0, "ceiling", 1, 1, TST_NUMBER, OP_CEILING )
- _OP_DEF(opexe_0, "truncate", 1, 1, TST_NUMBER, OP_TRUNCATE )
- _OP_DEF(opexe_0, "round", 1, 1, TST_NUMBER, OP_ROUND )
+_OP_DEF("inexact->exact", 1, 1, TST_NUMBER, OP_INEX2EX )
+_OP_DEF("exp", 1, 1, TST_NUMBER, OP_EXP )
+_OP_DEF("log", 1, 1, TST_NUMBER, OP_LOG )
+_OP_DEF("sin", 1, 1, TST_NUMBER, OP_SIN )
+_OP_DEF("cos", 1, 1, TST_NUMBER, OP_COS )
+_OP_DEF("tan", 1, 1, TST_NUMBER, OP_TAN )
+_OP_DEF("asin", 1, 1, TST_NUMBER, OP_ASIN )
+_OP_DEF("acos", 1, 1, TST_NUMBER, OP_ACOS )
+_OP_DEF("atan", 1, 2, TST_NUMBER, OP_ATAN )
+_OP_DEF("sqrt", 1, 1, TST_NUMBER, OP_SQRT )
+_OP_DEF("expt", 2, 2, TST_NUMBER, OP_EXPT )
+_OP_DEF("floor", 1, 1, TST_NUMBER, OP_FLOOR )
+_OP_DEF("ceiling", 1, 1, TST_NUMBER, OP_CEILING )
+_OP_DEF("truncate", 1, 1, TST_NUMBER, OP_TRUNCATE )
+_OP_DEF("round", 1, 1, TST_NUMBER, OP_ROUND )
#endif
- _OP_DEF(opexe_0, "+", 0, INF_ARG, TST_NUMBER, OP_ADD )
- _OP_DEF(opexe_0, "-", 1, INF_ARG, TST_NUMBER, OP_SUB )
- _OP_DEF(opexe_0, "*", 0, INF_ARG, TST_NUMBER, OP_MUL )
- _OP_DEF(opexe_0, "/", 1, INF_ARG, TST_NUMBER, OP_DIV )
- _OP_DEF(opexe_0, "quotient", 1, INF_ARG, TST_INTEGER, OP_INTDIV )
- _OP_DEF(opexe_0, "remainder", 2, 2, TST_INTEGER, OP_REM )
- _OP_DEF(opexe_0, "modulo", 2, 2, TST_INTEGER, OP_MOD )
- _OP_DEF(opexe_0, "car", 1, 1, TST_PAIR, OP_CAR )
- _OP_DEF(opexe_0, "cdr", 1, 1, TST_PAIR, OP_CDR )
- _OP_DEF(opexe_0, "cons", 2, 2, TST_NONE, OP_CONS )
- _OP_DEF(opexe_0, "set-car!", 2, 2, TST_PAIR TST_ANY, OP_SETCAR )
- _OP_DEF(opexe_0, "set-cdr!", 2, 2, TST_PAIR TST_ANY, OP_SETCDR )
- _OP_DEF(opexe_0, "char->integer", 1, 1, TST_CHAR, OP_CHAR2INT )
- _OP_DEF(opexe_0, "integer->char", 1, 1, TST_NATURAL, OP_INT2CHAR )
- _OP_DEF(opexe_0, "char-upcase", 1, 1, TST_CHAR, OP_CHARUPCASE )
- _OP_DEF(opexe_0, "char-downcase", 1, 1, TST_CHAR, OP_CHARDNCASE )
- _OP_DEF(opexe_0, "symbol->string", 1, 1, TST_SYMBOL, OP_SYM2STR )
- _OP_DEF(opexe_0, "atom->string", 1, 2, TST_ANY TST_NATURAL, OP_ATOM2STR )
- _OP_DEF(opexe_0, "string->symbol", 1, 1, TST_STRING, OP_STR2SYM )
- _OP_DEF(opexe_0, "string->atom", 1, 2, TST_STRING TST_NATURAL, OP_STR2ATOM )
- _OP_DEF(opexe_0, "make-string", 1, 2, TST_NATURAL TST_CHAR, OP_MKSTRING )
- _OP_DEF(opexe_0, "string-length", 1, 1, TST_STRING, OP_STRLEN )
- _OP_DEF(opexe_0, "string-ref", 2, 2, TST_STRING TST_NATURAL, OP_STRREF )
- _OP_DEF(opexe_0, "string-set!", 3, 3, TST_STRING TST_NATURAL TST_CHAR, OP_STRSET )
- _OP_DEF(opexe_0, "string-append", 0, INF_ARG, TST_STRING, OP_STRAPPEND )
- _OP_DEF(opexe_0, "substring", 2, 3, TST_STRING TST_NATURAL, OP_SUBSTR )
- _OP_DEF(opexe_0, "vector", 0, INF_ARG, TST_NONE, OP_VECTOR )
- _OP_DEF(opexe_0, "make-vector", 1, 2, TST_NATURAL TST_ANY, OP_MKVECTOR )
- _OP_DEF(opexe_0, "vector-length", 1, 1, TST_VECTOR, OP_VECLEN )
- _OP_DEF(opexe_0, "vector-ref", 2, 2, TST_VECTOR TST_NATURAL, OP_VECREF )
- _OP_DEF(opexe_0, "vector-set!", 3, 3, TST_VECTOR TST_NATURAL TST_ANY, OP_VECSET )
- _OP_DEF(opexe_0, "not", 1, 1, TST_NONE, OP_NOT )
- _OP_DEF(opexe_0, "boolean?", 1, 1, TST_NONE, OP_BOOLP )
- _OP_DEF(opexe_0, "eof-object?", 1, 1, TST_NONE, OP_EOFOBJP )
- _OP_DEF(opexe_0, "null?", 1, 1, TST_NONE, OP_NULLP )
- _OP_DEF(opexe_0, "=", 2, INF_ARG, TST_NUMBER, OP_NUMEQ )
- _OP_DEF(opexe_0, "<", 2, INF_ARG, TST_NUMBER, OP_LESS )
- _OP_DEF(opexe_0, ">", 2, INF_ARG, TST_NUMBER, OP_GRE )
- _OP_DEF(opexe_0, "<=", 2, INF_ARG, TST_NUMBER, OP_LEQ )
- _OP_DEF(opexe_0, ">=", 2, INF_ARG, TST_NUMBER, OP_GEQ )
- _OP_DEF(opexe_0, "symbol?", 1, 1, TST_ANY, OP_SYMBOLP )
- _OP_DEF(opexe_0, "number?", 1, 1, TST_ANY, OP_NUMBERP )
- _OP_DEF(opexe_0, "string?", 1, 1, TST_ANY, OP_STRINGP )
- _OP_DEF(opexe_0, "integer?", 1, 1, TST_ANY, OP_INTEGERP )
- _OP_DEF(opexe_0, "real?", 1, 1, TST_ANY, OP_REALP )
- _OP_DEF(opexe_0, "char?", 1, 1, TST_ANY, OP_CHARP )
+_OP_DEF("+", 0, INF_ARG, TST_NUMBER, OP_ADD )
+_OP_DEF("-", 1, INF_ARG, TST_NUMBER, OP_SUB )
+_OP_DEF("*", 0, INF_ARG, TST_NUMBER, OP_MUL )
+_OP_DEF("/", 1, INF_ARG, TST_NUMBER, OP_DIV )
+_OP_DEF("quotient", 1, INF_ARG, TST_INTEGER, OP_INTDIV )
+_OP_DEF("remainder", 2, 2, TST_INTEGER, OP_REM )
+_OP_DEF("modulo", 2, 2, TST_INTEGER, OP_MOD )
+_OP_DEF("car", 1, 1, TST_PAIR, OP_CAR )
+_OP_DEF("cdr", 1, 1, TST_PAIR, OP_CDR )
+_OP_DEF("cons", 2, 2, TST_NONE, OP_CONS )
+_OP_DEF("set-car!", 2, 2, TST_PAIR TST_ANY, OP_SETCAR )
+_OP_DEF("set-cdr!", 2, 2, TST_PAIR TST_ANY, OP_SETCDR )
+_OP_DEF("char->integer", 1, 1, TST_CHAR, OP_CHAR2INT )
+_OP_DEF("integer->char", 1, 1, TST_NATURAL, OP_INT2CHAR )
+_OP_DEF("char-upcase", 1, 1, TST_CHAR, OP_CHARUPCASE )
+_OP_DEF("char-downcase", 1, 1, TST_CHAR, OP_CHARDNCASE )
+_OP_DEF("symbol->string", 1, 1, TST_SYMBOL, OP_SYM2STR )
+_OP_DEF("atom->string", 1, 2, TST_ANY TST_NATURAL, OP_ATOM2STR )
+_OP_DEF("string->symbol", 1, 1, TST_STRING, OP_STR2SYM )
+_OP_DEF("string->atom", 1, 2, TST_STRING TST_NATURAL, OP_STR2ATOM )
+_OP_DEF("make-string", 1, 2, TST_NATURAL TST_CHAR, OP_MKSTRING )
+_OP_DEF("string-length", 1, 1, TST_STRING, OP_STRLEN )
+_OP_DEF("string-ref", 2, 2, TST_STRING TST_NATURAL, OP_STRREF )
+_OP_DEF("string-set!", 3, 3, TST_STRING TST_NATURAL TST_CHAR, OP_STRSET )
+_OP_DEF("string-append", 0, INF_ARG, TST_STRING, OP_STRAPPEND )
+_OP_DEF("substring", 2, 3, TST_STRING TST_NATURAL, OP_SUBSTR )
+_OP_DEF("vector", 0, INF_ARG, TST_NONE, OP_VECTOR )
+_OP_DEF("make-vector", 1, 2, TST_NATURAL TST_ANY, OP_MKVECTOR )
+_OP_DEF("vector-length", 1, 1, TST_VECTOR, OP_VECLEN )
+_OP_DEF("vector-ref", 2, 2, TST_VECTOR TST_NATURAL, OP_VECREF )
+_OP_DEF("vector-set!", 3, 3, TST_VECTOR TST_NATURAL TST_ANY, OP_VECSET )
+_OP_DEF("not", 1, 1, TST_NONE, OP_NOT )
+_OP_DEF("boolean?", 1, 1, TST_NONE, OP_BOOLP )
+_OP_DEF("eof-object?", 1, 1, TST_NONE, OP_EOFOBJP )
+_OP_DEF("null?", 1, 1, TST_NONE, OP_NULLP )
+_OP_DEF("=", 2, INF_ARG, TST_NUMBER, OP_NUMEQ )
+_OP_DEF("<", 2, INF_ARG, TST_NUMBER, OP_LESS )
+_OP_DEF(">", 2, INF_ARG, TST_NUMBER, OP_GRE )
+_OP_DEF("<=", 2, INF_ARG, TST_NUMBER, OP_LEQ )
+_OP_DEF(">=", 2, INF_ARG, TST_NUMBER, OP_GEQ )
+_OP_DEF("symbol?", 1, 1, TST_ANY, OP_SYMBOLP )
+_OP_DEF("number?", 1, 1, TST_ANY, OP_NUMBERP )
+_OP_DEF("string?", 1, 1, TST_ANY, OP_STRINGP )
+_OP_DEF("integer?", 1, 1, TST_ANY, OP_INTEGERP )
+_OP_DEF("real?", 1, 1, TST_ANY, OP_REALP )
+_OP_DEF("char?", 1, 1, TST_ANY, OP_CHARP )
#if USE_CHAR_CLASSIFIERS
- _OP_DEF(opexe_0, "char-alphabetic?", 1, 1, TST_CHAR, OP_CHARAP )
- _OP_DEF(opexe_0, "char-numeric?", 1, 1, TST_CHAR, OP_CHARNP )
- _OP_DEF(opexe_0, "char-whitespace?", 1, 1, TST_CHAR, OP_CHARWP )
- _OP_DEF(opexe_0, "char-upper-case?", 1, 1, TST_CHAR, OP_CHARUP )
- _OP_DEF(opexe_0, "char-lower-case?", 1, 1, TST_CHAR, OP_CHARLP )
+_OP_DEF("char-alphabetic?", 1, 1, TST_CHAR, OP_CHARAP )
+_OP_DEF("char-numeric?", 1, 1, TST_CHAR, OP_CHARNP )
+_OP_DEF("char-whitespace?", 1, 1, TST_CHAR, OP_CHARWP )
+_OP_DEF("char-upper-case?", 1, 1, TST_CHAR, OP_CHARUP )
+_OP_DEF("char-lower-case?", 1, 1, TST_CHAR, OP_CHARLP )
#endif
- _OP_DEF(opexe_0, "port?", 1, 1, TST_ANY, OP_PORTP )
- _OP_DEF(opexe_0, "input-port?", 1, 1, TST_ANY, OP_INPORTP )
- _OP_DEF(opexe_0, "output-port?", 1, 1, TST_ANY, OP_OUTPORTP )
- _OP_DEF(opexe_0, "procedure?", 1, 1, TST_ANY, OP_PROCP )
- _OP_DEF(opexe_0, "pair?", 1, 1, TST_ANY, OP_PAIRP )
- _OP_DEF(opexe_0, "list?", 1, 1, TST_ANY, OP_LISTP )
- _OP_DEF(opexe_0, "environment?", 1, 1, TST_ANY, OP_ENVP )
- _OP_DEF(opexe_0, "vector?", 1, 1, TST_ANY, OP_VECTORP )
- _OP_DEF(opexe_0, "eq?", 2, 2, TST_ANY, OP_EQ )
- _OP_DEF(opexe_0, "eqv?", 2, 2, TST_ANY, OP_EQV )
- _OP_DEF(opexe_0, "force", 1, 1, TST_ANY, OP_FORCE )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_SAVE_FORCED )
- _OP_DEF(opexe_0, "write", 1, 2, TST_ANY TST_OUTPORT, OP_WRITE )
- _OP_DEF(opexe_0, "write-char", 1, 2, TST_CHAR TST_OUTPORT, OP_WRITE_CHAR )
- _OP_DEF(opexe_0, "display", 1, 2, TST_ANY TST_OUTPORT, OP_DISPLAY )
- _OP_DEF(opexe_0, "newline", 0, 1, TST_OUTPORT, OP_NEWLINE )
- _OP_DEF(opexe_0, "error", 1, INF_ARG, TST_NONE, OP_ERR0 )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_ERR1 )
- _OP_DEF(opexe_0, "reverse", 1, 1, TST_LIST, OP_REVERSE )
- _OP_DEF(opexe_0, "list*", 1, INF_ARG, TST_NONE, OP_LIST_STAR )
- _OP_DEF(opexe_0, "append", 0, INF_ARG, TST_NONE, OP_APPEND )
+_OP_DEF("port?", 1, 1, TST_ANY, OP_PORTP )
+_OP_DEF("input-port?", 1, 1, TST_ANY, OP_INPORTP )
+_OP_DEF("output-port?", 1, 1, TST_ANY, OP_OUTPORTP )
+_OP_DEF("procedure?", 1, 1, TST_ANY, OP_PROCP )
+_OP_DEF("pair?", 1, 1, TST_ANY, OP_PAIRP )
+_OP_DEF("list?", 1, 1, TST_ANY, OP_LISTP )
+_OP_DEF("environment?", 1, 1, TST_ANY, OP_ENVP )
+_OP_DEF("vector?", 1, 1, TST_ANY, OP_VECTORP )
+_OP_DEF("eq?", 2, 2, TST_ANY, OP_EQ )
+_OP_DEF("eqv?", 2, 2, TST_ANY, OP_EQV )
+_OP_DEF("force", 1, 1, TST_ANY, OP_FORCE )
+_OP_DEF(0, 0, 0, 0, OP_SAVE_FORCED )
+_OP_DEF("write", 1, 2, TST_ANY TST_OUTPORT, OP_WRITE )
+_OP_DEF("write-char", 1, 2, TST_CHAR TST_OUTPORT, OP_WRITE_CHAR )
+_OP_DEF("display", 1, 2, TST_ANY TST_OUTPORT, OP_DISPLAY )
+_OP_DEF("newline", 0, 1, TST_OUTPORT, OP_NEWLINE )
+_OP_DEF("error", 1, INF_ARG, TST_NONE, OP_ERR0 )
+_OP_DEF(0, 0, 0, 0, OP_ERR1 )
+_OP_DEF("reverse", 1, 1, TST_LIST, OP_REVERSE )
+_OP_DEF("list*", 1, INF_ARG, TST_NONE, OP_LIST_STAR )
+_OP_DEF("append", 0, INF_ARG, TST_NONE, OP_APPEND )
#if USE_PLIST
- _OP_DEF(opexe_0, "set-symbol-property!", 3, 3, TST_SYMBOL TST_SYMBOL TST_ANY, OP_SET_SYMBOL_PROPERTY )
- _OP_DEF(opexe_0, "symbol-property", 2, 2, TST_SYMBOL TST_SYMBOL, OP_SYMBOL_PROPERTY )
+_OP_DEF("set-symbol-property!", 3, 3, TST_SYMBOL TST_SYMBOL TST_ANY, OP_SET_SYMBOL_PROPERTY )
+_OP_DEF("symbol-property", 2, 2, TST_SYMBOL TST_SYMBOL, OP_SYMBOL_PROPERTY )
#endif
#if USE_TAGS
- _OP_DEF(opexe_0, NULL, 0, 0, TST_NONE, OP_TAG_VALUE )
- _OP_DEF(opexe_0, "make-tagged-value", 2, 2, TST_ANY TST_PAIR, OP_MK_TAGGED )
- _OP_DEF(opexe_0, "get-tag", 1, 1, TST_ANY, OP_GET_TAG )
+_OP_DEF(NULL, 0, 0, TST_NONE, OP_TAG_VALUE )
+_OP_DEF("make-tagged-value", 2, 2, TST_ANY TST_PAIR, OP_MK_TAGGED )
+_OP_DEF("get-tag", 1, 1, TST_ANY, OP_GET_TAG )
#endif
- _OP_DEF(opexe_0, "quit", 0, 1, TST_NUMBER, OP_QUIT )
- _OP_DEF(opexe_0, "gc", 0, 0, 0, OP_GC )
- _OP_DEF(opexe_0, "gc-verbose", 0, 1, TST_NONE, OP_GCVERB )
- _OP_DEF(opexe_0, "new-segment", 0, 1, TST_NUMBER, OP_NEWSEGMENT )
- _OP_DEF(opexe_0, "oblist", 0, 0, 0, OP_OBLIST )
- _OP_DEF(opexe_0, "current-input-port", 0, 0, 0, OP_CURR_INPORT )
- _OP_DEF(opexe_0, "current-output-port", 0, 0, 0, OP_CURR_OUTPORT )
- _OP_DEF(opexe_0, "open-input-file", 1, 1, TST_STRING, OP_OPEN_INFILE )
- _OP_DEF(opexe_0, "open-output-file", 1, 1, TST_STRING, OP_OPEN_OUTFILE )
- _OP_DEF(opexe_0, "open-input-output-file", 1, 1, TST_STRING, OP_OPEN_INOUTFILE )
+_OP_DEF("quit", 0, 1, TST_NUMBER, OP_QUIT )
+_OP_DEF("gc", 0, 0, 0, OP_GC )
+_OP_DEF("gc-verbose", 0, 1, TST_NONE, OP_GCVERB )
+_OP_DEF("new-segment", 0, 1, TST_NUMBER, OP_NEWSEGMENT )
+_OP_DEF("oblist", 0, 0, 0, OP_OBLIST )
+_OP_DEF("current-input-port", 0, 0, 0, OP_CURR_INPORT )
+_OP_DEF("current-output-port", 0, 0, 0, OP_CURR_OUTPORT )
+_OP_DEF("open-input-file", 1, 1, TST_STRING, OP_OPEN_INFILE )
+_OP_DEF("open-output-file", 1, 1, TST_STRING, OP_OPEN_OUTFILE )
+_OP_DEF("open-input-output-file", 1, 1, TST_STRING, OP_OPEN_INOUTFILE )
#if USE_STRING_PORTS
- _OP_DEF(opexe_0, "open-input-string", 1, 1, TST_STRING, OP_OPEN_INSTRING )
- _OP_DEF(opexe_0, "open-input-output-string", 1, 1, TST_STRING, OP_OPEN_INOUTSTRING )
- _OP_DEF(opexe_0, "open-output-string", 0, 1, TST_STRING, OP_OPEN_OUTSTRING )
- _OP_DEF(opexe_0, "get-output-string", 1, 1, TST_OUTPORT, OP_GET_OUTSTRING )
+_OP_DEF("open-input-string", 1, 1, TST_STRING, OP_OPEN_INSTRING )
+_OP_DEF("open-input-output-string", 1, 1, TST_STRING, OP_OPEN_INOUTSTRING )
+_OP_DEF("open-output-string", 0, 1, TST_STRING, OP_OPEN_OUTSTRING )
+_OP_DEF("get-output-string", 1, 1, TST_OUTPORT, OP_GET_OUTSTRING )
#endif
- _OP_DEF(opexe_0, "close-input-port", 1, 1, TST_INPORT, OP_CLOSE_INPORT )
- _OP_DEF(opexe_0, "close-output-port", 1, 1, TST_OUTPORT, OP_CLOSE_OUTPORT )
- _OP_DEF(opexe_0, "interaction-environment", 0, 0, 0, OP_INT_ENV )
- _OP_DEF(opexe_0, "current-environment", 0, 0, 0, OP_CURR_ENV )
- _OP_DEF(opexe_0, "read", 0, 1, TST_INPORT, OP_READ )
- _OP_DEF(opexe_0, "read-char", 0, 1, TST_INPORT, OP_READ_CHAR )
- _OP_DEF(opexe_0, "peek-char", 0, 1, TST_INPORT, OP_PEEK_CHAR )
- _OP_DEF(opexe_0, "char-ready?", 0, 1, TST_INPORT, OP_CHAR_READY )
- _OP_DEF(opexe_0, "set-input-port", 1, 1, TST_INPORT, OP_SET_INPORT )
- _OP_DEF(opexe_0, "set-output-port", 1, 1, TST_OUTPORT, OP_SET_OUTPORT )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_RDSEXPR )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_RDLIST )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_RDDOT )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_RDQUOTE )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_RDQQUOTE )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_RDQQUOTEVEC )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_RDUNQUOTE )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_RDUQTSP )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_RDVEC )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_P0LIST )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_P1LIST )
- _OP_DEF(opexe_0, 0, 0, 0, 0, OP_PVECFROM )
- _OP_DEF(opexe_0, "length", 1, 1, TST_LIST, OP_LIST_LENGTH )
- _OP_DEF(opexe_0, "assq", 2, 2, TST_NONE, OP_ASSQ )
- _OP_DEF(opexe_0, "get-closure-code", 1, 1, TST_NONE, OP_GET_CLOSURE )
- _OP_DEF(opexe_0, "closure?", 1, 1, TST_NONE, OP_CLOSUREP )
- _OP_DEF(opexe_0, "macro?", 1, 1, TST_NONE, OP_MACROP )
- _OP_DEF(opexe_0, "*vm-history*", 0, 0, TST_NONE, OP_VM_HISTORY )
+_OP_DEF("close-input-port", 1, 1, TST_INPORT, OP_CLOSE_INPORT )
+_OP_DEF("close-output-port", 1, 1, TST_OUTPORT, OP_CLOSE_OUTPORT )
+_OP_DEF("interaction-environment", 0, 0, 0, OP_INT_ENV )
+_OP_DEF("current-environment", 0, 0, 0, OP_CURR_ENV )
+_OP_DEF("read", 0, 1, TST_INPORT, OP_READ )
+_OP_DEF("read-char", 0, 1, TST_INPORT, OP_READ_CHAR )
+_OP_DEF("peek-char", 0, 1, TST_INPORT, OP_PEEK_CHAR )
+_OP_DEF("char-ready?", 0, 1, TST_INPORT, OP_CHAR_READY )
+_OP_DEF("set-input-port", 1, 1, TST_INPORT, OP_SET_INPORT )
+_OP_DEF("set-output-port", 1, 1, TST_OUTPORT, OP_SET_OUTPORT )
+_OP_DEF(0, 0, 0, 0, OP_RDSEXPR )
+_OP_DEF(0, 0, 0, 0, OP_RDLIST )
+_OP_DEF(0, 0, 0, 0, OP_RDDOT )
+_OP_DEF(0, 0, 0, 0, OP_RDQUOTE )
+_OP_DEF(0, 0, 0, 0, OP_RDQQUOTE )
+_OP_DEF(0, 0, 0, 0, OP_RDQQUOTEVEC )
+_OP_DEF(0, 0, 0, 0, OP_RDUNQUOTE )
+_OP_DEF(0, 0, 0, 0, OP_RDUQTSP )
+_OP_DEF(0, 0, 0, 0, OP_RDVEC )
+_OP_DEF(0, 0, 0, 0, OP_P0LIST )
+_OP_DEF(0, 0, 0, 0, OP_P1LIST )
+_OP_DEF(0, 0, 0, 0, OP_PVECFROM )
+_OP_DEF("length", 1, 1, TST_LIST, OP_LIST_LENGTH )
+_OP_DEF("assq", 2, 2, TST_NONE, OP_ASSQ )
+_OP_DEF("get-closure-code", 1, 1, TST_NONE, OP_GET_CLOSURE )
+_OP_DEF("closure?", 1, 1, TST_NONE, OP_CLOSUREP )
+_OP_DEF("macro?", 1, 1, TST_NONE, OP_MACROP )
+_OP_DEF("*vm-history*", 0, 0, TST_NONE, OP_VM_HISTORY )
#undef _OP_DEF
diff --git a/tests/gpgscm/scheme-private.h b/tests/gpgscm/scheme-private.h
index abe65e7..075dc70 100644
--- a/tests/gpgscm/scheme-private.h
+++ b/tests/gpgscm/scheme-private.h
@@ -200,7 +200,7 @@ const struct scheme_interface *vptr;
/* operator code */
enum scheme_opcodes {
-#define _OP_DEF(A,B,C,D,E,OP) OP,
+#define _OP_DEF(A,B,C,D,OP) OP,
#include "opdefines.h"
OP_MAXDEFINED
};
diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c
index f90ac3f..07f56ed 100644
--- a/tests/gpgscm/scheme.c
+++ b/tests/gpgscm/scheme.c
@@ -5213,8 +5213,6 @@ static pointer opexe_0(scheme *sc, enum scheme_opcodes op) {
return sc->T; /* NOTREACHED */
}
-typedef pointer (*dispatch_func)(scheme *, enum scheme_opcodes);
-
typedef int (*test_predicate)(pointer);
static int is_any(pointer p) {
@@ -5265,7 +5263,6 @@ static const struct {
#define TST_NATURAL "\016"
typedef struct {
- dispatch_func func;
const char *name;
int min_arity;
int max_arity;
@@ -5275,7 +5272,7 @@ typedef struct {
#define INF_ARG 0xffff
static const op_code_info dispatch_table[]= {
-#define _OP_DEF(A,B,C,D,E,OP) {A,B,C,D,E},
+#define _OP_DEF(A,B,C,D,OP) {A,B,C,D},
#include "opdefines.h"
#undef _OP_DEF
{ 0 }
@@ -5354,7 +5351,7 @@ static void Eval_Cycle(scheme *sc, enum scheme_opcodes op) {
}
}
ok_to_freely_gc(sc);
- if (pcd->func(sc, (enum scheme_opcodes)sc->op) == sc->NIL) {
+ if (opexe_0(sc, (enum scheme_opcodes)sc->op) == sc->NIL) {
return;
}
if(sc->no_memory) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list