pygraphviz icon indicating copy to clipboard operation
pygraphviz copied to clipboard

Incorrect types in swig input file

Open jamesjer opened this issue 7 years ago • 1 comments

The agattr_label function is declared to return int, but it should return Agsym_t * instead. Also, the second parameter of agidnode and the fourth parameter of agidedge should have type IDTYPE, rather than unsigned long (which may or may not be the same type as IDTYPE).

jamesjer avatar Oct 11 '18 17:10 jamesjer

It looks like the return type of agattr_label has been corrected to Agsym_t *. The impact of setting the type of the parameters mentioned above to IDTYPE is not clear to me. In cgraph.h IDTYPE is currently set to be uint64_t. I guess this change would ensure that pygraphviz would include any potential future change in that type.

If someone wants to try this change, it would occur at lines 153 and 166 of graphviz.i and would change unsigned long to IDTYPE.

dschult avatar Aug 17 '22 20:08 dschult