in reply to Re: perlXS assignment from incompatible pointer type
in thread perlXS assignment from incompatible pointer type (works)
andtypedef struct Foo { ... } Foo;
In the first case, you can use struct Foo and Foo interchangeably. I think... Compatibility rules for types in C are pretty complex and obscure. Anyway, in the second case you don't have struct Foo, you have just Foo which is a name for an anonymous struct (while Foo in struct Foo is not a name but a tag). Yes, it's pretty confusing... but don't worry: there are some things in C that are a lot more obscure and error prone than that :) I suggest you to avoid typedefs for the time being.typedef struct { ... } Foo;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: perlXS assignment from incompatible pointer type
by Anonymous Monk on Mar 23, 2016 at 10:14 UTC |