Re: glib on Symbian
- From: sparkymat <csy0013 googlemail com>
- To: "Tor Lillqvist" <tml iki fi>
- Cc: Biswajeet Dash symbian com, gtk+ dev <gtk-devel-list gnome org>
- Subject: Re: glib on Symbian
- Date: Fri, 5 Sep 2008 16:16:23 +0530
Please show some concrete (minimal) example... I have a hard time to
understand *exactly* what you mean.
There must be some better way around this than adding 2000 ifdefs all
around the code, which frankly doesn't sound acceptable to me. Sure,
some ifdefs can be added, but in as few places as possible. Some
clever use of the C preprocessor defining names of global variables
as function calls retuning a pointer to function-local static data
instead, or some clever preprocessing script used for Symbian
compilations, or whatever.
--tml
We are doing what you have mentioned above, i.e. defining name of global variables as function calls returning a pointer.
For example, in gdate.c,
static gboolean using_twodigit_years = FALSE;
would become
#if defined(__SYMBIAN32__) && defined(EMULATOR)
PLS(using_twodigit_years,gdate, gboolean)
#define using_twodigit_years (*FUNCTION_NAME(using_twodigit_years ,gdate)()
#else
static gboolean using_twodigit_years = FALSE;
#endif
where the PLS() macro will add the specified variable to the Process Local Storage, and the define will map it to a function pointer.
This is repeated for all write-able static data (WSD).
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]