Re: volatile data members
Pedro L. Lucas <[email protected]> Fri, 25 Jan 2013 20:08:14 +0000 (UTC)
| Newsgroups | gmane.comp.gnome.devtools.gob.general |
|---|---|
| Message-ID | <[email protected]> |
> Hi,
>
> I tried to declare a data member as so:
>
> ...
> private volatile gint my_volatile_var;
> ...
>
> It seems that GOB is unable to handle this declaration.
>
> Is there a way to make it work?
Maybe you can create a void pointer:
private void *my_volatile_var;
Then in init part declare your variable somewhere (inside a module)
and point to it:
...In some module...
volatile gint real_volatile_var;
...
init(self)
{
...
self->_priv->my_volatile_var=&real_volatile_var;
...
}
--
to unsubscribe:
send mail to [email protected] with "unsubscribe gob-list" in the subject