I would like to convert the following C struct to nim.
    
    
    # foo.h
    struct foo
    {
       void (*bar)(int &fuz);
    };
    

c2nim does not seem to support this construct
    
    
    $ c2nim foo.h
    foo.h(3, 21) Error: ')' expected
    
    $ c2nim --cpp foo.h
    foo.h(3, 11) Error: identifier expected, but found '*'
    

What is the correct way to convert this manually, or get reasonably close?

This is going to be plumbing code to interface with an existing C codebase. 

Reply via email to