libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] miscellaneous requests


From: Christian Grothoff
Subject: Re: [libmicrohttpd] miscellaneous requests
Date: Wed, 31 Mar 2010 08:48:12 +0200
User-agent: KMail/1.12.4 (Linux/2.6.32-trunk-686; KDE/4.3.4; i686; ; )

On Tuesday 30 March 2010 20:08:53 Marco Maggi wrote:
> 1. Is it possible to typedef all the enumerations?  Example:
> 
> typedef enum MHD_ValueKind
> {
>   MHD_RESPONSE_HEADER_KIND = 0,
>   MHD_HEADER_KIND = 1,
>   MHD_COOKIE_KIND = 2,
>   MHD_POSTDATA_KIND = 4,
>   MHD_GET_ARGUMENT_KIND = 8,
>   MHD_FOOTER_KIND = 16
> } MHD_ValueKind;
> 
> 2.  Is  it possible  to  typedef  all  the data  structures?
> Example:
> 
> typedef struct MHD_OptionItem
> {
>   enum MHD_OPTION option;
>   intptr_t value;
>   void *ptr_value;
> } MHD_OptionItem;

I don't like this, it simply obscures the type further and adds yet another 
symbol.  So simply for style reasons, I would not go there. However, you can 
in your own code simply add a 

typedef struct MHD_OptionItem MHD_OptionItem;

and get the same effect for your code.

> 3.   Can  the  "max_fd"  argument  to  "MHD_get_fdset()"  be
> optionally set to NULL if  we are not interested in handling
> that value?

I suspect not right now, but we could change that requirement.

Best,

Christian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]