]> granicus.if.org Git - graphviz/commitdiff
expr: remove unused parameters from 'Exdisc_t.keyf'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 5 Aug 2022 04:28:01 +0000 (21:28 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 5 Aug 2022 04:28:01 +0000 (21:28 -0700)
I guess when I committed 2e9753d9c9886f5bc013212420528e9a18bc592b 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 2d4e6c448eedac2eb88e54c4fb7f57be1d6e9c78..5cdf90a68c4108e358b3bd7f64a4ec199c9ccdd8 100644 (file)
@@ -99,7 +99,7 @@ static int evaldyn(Expr_t *ex, Exnode_t *exnode, void *env, int delete) {
                int type = exnode->data.variable.index->type;
                if (type != STRING) {
                        if (!BUILTIN(type)) {
-                               key = (*ex->disc->keyf) (ex, v, type, ex->disc);
+                               key = (*ex->disc->keyf) (v, type);
                        } else
                                key.integer = v.integer;
                        snprintf(buf, sizeof(buf), "%llx", (unsigned long long)key.integer);
@@ -146,7 +146,7 @@ static Extype_t getdyn(Expr_t *ex, Exnode_t *exnode, void *env,
                        int type = exnode->data.variable.index->type;
                        if (type != STRING) {
                                if (!BUILTIN(type)) {
-                                       key = (*ex->disc->keyf) (ex, v, type, ex->disc);
+                                       key = (*ex->disc->keyf) (v, type);
                                } else
                                        key.integer = v.integer;
                                snprintf(buf, sizeof(buf), "%llx", (unsigned long long)key.integer);
index 1383fcd71bd169ccb7953485456e7af9c2973d1e..1b27f1ba07dc3b90f017bdc1e0e0c8f78afe8726 100644 (file)
@@ -210,7 +210,7 @@ struct Exdisc_s                             /* discipline                   */
                                        /* application type names       */
        int             (*stringof) (Expr_t *, Exnode_t *, int, Exdisc_t *);
                                        /* value to string conversion   */
-       Extype_t        (*keyf) (Expr_t *, Extype_t, int, Exdisc_t *);
+       Extype_t        (*keyf) (Extype_t, int);
                                        /* dictionary key for external type objects     */
        Exerror_f       errorf;         /* error function               */
        Extype_t        (*getf)(Expr_t*, Exnode_t*, Exid_t*, Exref_t*, void*, int, Exdisc_t*);
index e01aec98fbe2f4b6bb18ff732fbc51ce8b8da513..4b904d0e0918a7fc98228b3450e467421612fe2d 100644 (file)
@@ -2205,11 +2205,7 @@ static int convert(Exnode_t *x, int type, int arg) {
  * Calculate unique key for object.
  * We use this to unify local copies of nodes and edges.
  */
-static Extype_t keyval(Expr_t * pgm, Extype_t v, int type, Exdisc_t * disc)
-{
-    (void)pgm;
-    (void)disc;
-
+static Extype_t keyval(Extype_t v, int type) {
     if (type <= T_obj) {
        v.integer = AGID(int2ptr(v.integer));
     }