From: Emden R. Gansner Date: Sun, 23 Mar 2014 17:52:06 +0000 (-0400) Subject: For caching state to work, G_mindist must be a static variable. X-Git-Tag: 2.38.0~16^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b89f47ca3943bf4b065d2fea5b9fe79d75916eb4;p=graphviz For caching state to work, G_mindist must be a static variable. --- diff --git a/lib/circogen/circular.c b/lib/circogen/circular.c index f268b7c6a..395034a82 100644 --- a/lib/circogen/circular.c +++ b/lib/circogen/circular.c @@ -29,10 +29,9 @@ static void initGraphAttrs(Agraph_t * g, circ_state * state) static Agraph_t *rootg; static attrsym_t *N_artpos; static attrsym_t *N_root; - static double min_dist; + static attrsym_t *G_mindist; static char *rootname; Agraph_t *rg; - attrsym_t *G_mindist; node_t *n = agfstnode(g); rg = agraphof(ORIGN(n)); @@ -44,10 +43,9 @@ static void initGraphAttrs(Agraph_t * g, circ_state * state) N_root = agattr(rootg,AGNODE, "root", NULL); } rootname = agget(rootg, "root"); - min_dist = late_double(rootg, G_mindist, MINDIST, 0.0); initBlocklist(&state->bl); state->orderCount = 1; - state->min_dist = min_dist; + state->min_dist = late_double(rootg, G_mindist, MINDIST, 0.0); state->N_artpos = N_artpos; state->N_root = N_root; state->rootname = rootname;