]> granicus.if.org Git - graphviz/commitdiff
expr: remove now unused 'disc' parameter to 'Exdisc_t.stringof'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 7 Aug 2022 17:10:43 +0000 (10:10 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 13 Aug 2022 16:18:53 +0000 (09:18 -0700)
lib/expr/exeval.c
lib/expr/exgram.h
lib/expr/expr.h
lib/gvpr/compile.c

index 5d0590c9d627db6d8c0c56e03eaf3636837b063c..ece5423fa8589e3fe1659ad039998967abb7e199 100644 (file)
@@ -1099,7 +1099,7 @@ xPrint(Expr_t * ex, Exnode_t * expr, Extype_t v, Exnode_t * tmp)
 {
        *tmp = *expr->data.operand.left;
        tmp->data.constant.value = v;
-       if (ex->disc->stringof(ex, tmp, 0, ex->disc))
+       if (ex->disc->stringof(ex, tmp, 0))
        exerror("%s: no string representation of %s value",
                expr->data.operand.left->data.variable.symbol->name,
                extypename(ex, expr->data.operand.left->type));
index ea05255de8a2172eb853c6192a8807f049f3b1ad..8f3e242027b51b9c7fdafbe6af46e2521dc43485 100644 (file)
@@ -304,7 +304,7 @@ static Exnode_t *exstringOf(Expr_t * p, Exnode_t * x) {
            exerror("cannot convert %s to STRING", extypename(p, type));
        if (x->op != CONSTANT) {
            if (!BUILTIN(type)) {
-               if (p->disc->stringof(p, x, 1, p->disc) < 0) {
+               if (p->disc->stringof(p, x, 1) < 0) {
                    exerror("cannot convert %s to STRING",
                            extypename(p, type));
                }
@@ -320,7 +320,7 @@ static Exnode_t *exstringOf(Expr_t * p, Exnode_t * x) {
                }
            x = exnewnode(p, cvt, 0, STRING, x, 0);
        } else if (!BUILTIN(type)) {
-           if (p->disc->stringof(p, x, 0, p->disc) < 0)
+           if (p->disc->stringof(p, x, 0) < 0)
                exerror("cannot convert constant %s to STRING",
                        extypename(p, x->type));
        } else
index ddadb0a8f5c066b090b50f36cf0172973bdd1994..607e7acf8f43142b098e7a972535cb9f63467243 100644 (file)
@@ -208,7 +208,7 @@ struct Exdisc_s                             /* discipline                   */
                                        /* binary operator function     */
        char*           (*typename) (int);
                                        /* application type names       */
-       int             (*stringof) (Expr_t *, Exnode_t *, int, Exdisc_t *);
+       int             (*stringof) (Expr_t *, Exnode_t *, int);
                                        /* value to string conversion   */
        Extype_t        (*keyf) (Extype_t, int);
                                        /* dictionary key for external type objects     */
index 7058c368a9d648b95044e383b5700ffe3e2b5e4d..2c35bca0e8e39f073e8ead54ab4b06cdb56b1d14 100644 (file)
@@ -2094,8 +2094,7 @@ static char *tvtypeToStr(long long v) {
  * Return -1 if conversion cannot be done, 0 otherwise.
  * If arg is > 0, conversion unnecessary; just report possibility.
  */
-static int stringOf(Expr_t * prog, Exnode_t * x, int arg, Exdisc_t* disc)
-{
+static int stringOf(Expr_t *prog, Exnode_t *x, int arg) {
     Agobj_t *objp;
     int rv = 0;