Re: Plans for 1.3/1.4

>  from '' on 'Mar 01 11:17 +0100' | sed
'1,s/^/> /'
>>  >  4) Integration of Tor Lillqvist's Win32 port.
>> Would it be cleaner (more orthogonal) to use something like
>> etc? (Or is that too verbose?) (There is not much code in gtk+/gtk
>> that needs conditional compilation.)
>I would prefer
>	if (GDK_API() == GDK_X11) {
>	}
>	switch (GDK_API()) {
>	case GDK_X11:
>		...
>	}
>, where GDK_API() is either macro hardcoded to specific value
>(i.e. #define GDK_API() GDK_X11)
>*or* real function. gcc can optimize it out, anyway, it is much
>cleaner, and - we'll need gtk runnable over multiple gdk's in future.
>(Think about gtk runable over gdk.cursed or gdk.X11 at some time. The
>same might have sense for gdk.beos and gdk.X11 - assuming that BeOS
>has working X11 port.)

Please don't do this, it will make it easier all round if its #ifdef
rather than if.

By making it 'if' based requires valid C syntax in each part of the
conditional #ifdef doesn't (and you can use it for #includes). ANDF
tried to make everything doable at run-time (no conditional
compilation), and eventually you find out that it only works for
simple cases---but by then its too late.

>								Pavel


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