Re: enum.pl issue



On Mon, 2009-05-18 at 23:06 -0500, Jonathon Jongsma wrote:
> Can somebody who has at least some clue about perl (i.e. not me) take a look at why 
> enum.pl is failing for GSocketFamily?  Here is how it is defined:
> 
> Here is how it is defined in code:
> 
> typedef enum {
>    G_SOCKET_FAMILY_INVALID,
> #ifdef GLIB_SYSDEF_AF_UNIX
>    G_SOCKET_FAMILY_UNIX = GLIB_SYSDEF_AF_UNIX,
> #endif
>    G_SOCKET_FAMILY_IPV4 = GLIB_SYSDEF_AF_INET,
>    G_SOCKET_FAMILY_IPV6 = GLIB_SYSDEF_AF_INET6
> } GSocketFamily;
> 
> 
> Here is the output from enum.pl
> 
> (define-enum-extended SocketFamily
>    (in-module "G")
>    (c-name "GSocketFamily")
>    (values
>      '("invalid" "G_SOCKET_FAMILY_INVALID" "0")
>      '("ipv6" "G_SOCKET_FAMILY_IPV6" "3")
>    )
> )
> 
> hm.  now that I think about it, even if the perl parser was 'fixed', we would probably end 
> up with problems here due to the ifdef.  So perhaps we should just hand-code this one?  Or 
> just use the C enum and don't wrap it?  or...?

Yes, maybe it should be hand-written, so we can have an ifdef in the C++
enum too. How often is this enum used in the API?

-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]