[C2hs] Re: enum define hooks
Gour
gour at mail.inet.hr
Mon Mar 3 02:17:36 EST 2008
>>>>> "Manuel" == Manuel M T Chakravarty <chak at cse.unsw.edu.au> writes:
Hi Manuel,
Thank you for reply.
Manuel> I'd recommend to use inline C in the .chs file, where you define
Manuel> suitable enum with something like
Manuel> enum SE_ENUM { SE_ENUM_SUN = SE_SUN, <and so on>
Manuel> }
Manuel> and then let c2hs marshal SE_ENUM.
I was looking at examples and came up with the same solution:
#c
enum PlanetNumbers {
SeSun = SE_SUN,
...
};
#endc
{#enum PlanetNumbers {}#}
It seems as very good workaround in the absence of "enum define" hooks.
Thank you for c2hs. I'm happy to use it...
Sincerely,
Gour
--
Gour | Zagreb, Croatia | GPG key: C6E7162D
----------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/c2hs/attachments/20080303/b3a54170/attachment.bin
More information about the C2hs
mailing list