Re: Some headerfiles patches



-On [20000116 23:25], Kaz Kylheku (kaz@ashi.footprints.net) wrote:
>On Sun, 16 Jan 2000, Jeroen Ruigrok/Asmodai wrote:
>
>> >
>> >typedef void    (*GtkItemFactoryCallback)  ();
>> >
>> >to
>> >
>> >typedef void    (*GtkItemFactoryCallback)  (void);
>> 
>> I mistook them for empty braces.  But I understand these should be
>> variable argument cases.  Am I correct in this assumption?
>
>No. The way to declare a variadic function in C and C++ is to use ellipses.  An
>empty parameter list in C++ declares a function that takes no parameters, like
>the (void) list in ANSI C.  An empty parameter list in C declares a function
>which takes a fixed number of arguments, but does not specify that number, or
>their types.

Yeah, my bad.  I explained poorly above.

What I meant was that I thought the empty braces () were a lousy
substitute for (void).

But after rereading the thread earlier about this I realised that it was
due to variable arguments to the function.

Hope this rectifies,

-- 
Jeroen Ruigrok van der Werven/Asmodai           asmodai@[wxs.nl|bart.nl]
Documentation nutter.          *BSD: Technical excellence at its best...  
The BSD Programmer's Documentation Project <http://home.wxs.nl/~asmodai>
We must all hang together, else we shall all hang separately...



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