Open miguelmartin75 opened 11 months ago
For example:
foo.h:
foo.h
typedef struct FooImpl* Foo;
Should output
discard "forward decl of FooImpl" type Foo* = ptr FooImpl
However, instead c2nim outputs:
c2nim
type Foo* = ptr FooImpl
If you attempt to import foo, Nim will complain about FooImpl not being declared.
import foo
FooImpl
One can get around this via forward declaring on a separate line in the header file, i.e. the C header should look as follows:
struct FooImpl; typedef struct FooImpl* Foo;
Never mind, in both cases, this does not work. I'm not sure how to deal with private/Opaque structs.
Apologies for the noise.
For example:
foo.h
:Should output
However, instead
c2nim
outputs:If you attempt to
import foo
, Nim will complain aboutFooImpl
not being declared.One can get around this via forward declaring on a separate line in the header file, i.e. the C header should look as follows: