1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

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@g10code.com>
This commit is contained in:
Justus Winter 2017-03-29 14:11:58 +02:00
parent ddf444828b
commit e7ed9822e2
No known key found for this signature in database
GPG key ID: DD1A52F9DA8C9020
3 changed files with 191 additions and 194 deletions

View file

@ -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) {