ImportC with typedef anonymous enums
Imperatorn
johan_forsberg_86 at hotmail.com
Fri Sep 1 17:27:21 UTC 2023
On Friday, 1 September 2023 at 02:10:15 UTC, Chance Snow wrote:
> I am also experiencing this issue with the following C enum:
>
> ```c
> // A list of all possible value types in WebAssembly.
> typedef enum {
> // Signed 32 bit integer.
> I32,
> // Signed 64 bit integer.
> I64,
> // Floating point 32 bit integer.
> F32,
> // Floating point 64 bit integer.
> F64,
> // A 128 bit number.
> V128,
> // A reference to a Wasm function.
> FuncRef,
> // A reference to opaque data in the Wasm instance.
> ExternRef,
> } ExtismValType;
> ```
>
> On Wednesday, 9 November 2022 at 18:20:18 UTC, Imperatorn wrote:
>> Just a sidenote, but for some reason, casting it like this
>> works:
>> someFunc2((cast(typeof(my_struct.opts))eopt));
>
> Not sure why, either, but this workaround also works for me.
Are you in the discord server btw?
More information about the Digitalmars-d
mailing list