]> granicus.if.org Git - graphviz/commitdiff
expr: remove unused parameters from 'Exdisc_t.setf'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 5 Aug 2022 04:35:28 +0000 (21:35 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 6 Aug 2022 17:13:27 +0000 (10:13 -0700)
I guess when I committed 5b4de3922a2f169c2e773ffe85651898aedd9351 it was not
obvious to me that this is entirely part of private internal interfaces and the
callback signature involved is not exposed publicly.

lib/expr/exeval.c
lib/expr/expr.h
lib/gvpr/compile.c

index 49989ce6e38b47f2130eddd46cf66bdb6104d19f..4ec7328787af8ea70af949e45f12678d19aa48c6 100644 (file)
@@ -1204,8 +1204,7 @@ eval(Expr_t* ex, Exnode_t* expr, void* env)
                                x->data.variable.dyna->data.variable.dyna->data.constant.value = locv;
                        }
                        if (ex->disc->setf(ex, x, x->data.variable.symbol,
-                                          x->data.variable.reference, env, (int)i.integer, v,
-                                          ex->disc) < 0)
+                                          x->data.variable.reference, env, v) < 0)
                                exerror("%s: cannot set value", x->data.variable.symbol->name);
                }
                if (expr->subop == PRE)
index 1b27f1ba07dc3b90f017bdc1e0e0c8f78afe8726..0cfe15d5bfc7f6553c18e6d55a408133a82b136f 100644 (file)
@@ -217,7 +217,7 @@ struct Exdisc_s                             /* discipline                   */
                                        /* get value function           */
        Extype_t        (*reff)(Expr_t*, Exnode_t*, Exid_t*, Exref_t*);
                                        /* reference value function     */
-       int             (*setf)(Expr_t*, Exnode_t*, Exid_t*, Exref_t*, void*, int, Extype_t, Exdisc_t*);
+       int             (*setf)(Expr_t*, Exnode_t*, Exid_t*, Exref_t*, void*, Extype_t);
                                        /* set value function           */
        int             (*matchf)(Expr_t*, Exnode_t*, const char*, Exnode_t*, const char*, void*, Exdisc_t*);
        /* exit function           */
index c1f9a0c525617dd50e4d79268c6f7d39baf4baff..aff5532567108ce1562416451454ee2c0ed6d3bf 100644 (file)
@@ -1603,11 +1603,8 @@ static char *typeName(int op) {
  */
 static int
 setval(Expr_t * pgm, Exnode_t * x, Exid_t * sym, Exref_t * ref,
-       void *env, int elt, Extype_t v, Exdisc_t * disc)
+       void *env, Extype_t v)
 {
-    (void)elt;
-    (void)disc;
-
     Gpr_t *state;
     Agobj_t *objp;
     Agnode_t *np;