I'm trying to interface with libnauty to do some graph-isomorphism stuff. I've 
gone through the docs many times but haven't been able to find a way to 
adequately write a certain struct type.

In nauty.h:820 there's an incomplete definition followed by a struct that 
contains a pointer to it, then the completed definition pointing back to the 
other struct:

struct optionstruct;

typedef struct
{
   ...
   void (*init)(..., struct optionstruct*, ...);
   ...
} dispatchvec;

typedef struct optionstruct
{
   ...
   dispatchvec *dispatch;
   ...
} optionblk;

If I try to write these two struct types with define-cstruct, then the 
dispatchvec's usage of _optionstruct-pointer is an undefined identifier error.

I currently replaced this with _pointer to get it all to compile. That might 
work. I'm just wondering if I missed something. Mutual recursion seems like an 
important feature.

-Ian

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to