Re: [Vala] volatile variable
- From: Edward Hennessy <ehennes sbcglobal net>
- To: vala-list gnome org
- Subject: Re: [Vala] volatile variable
- Date: Sun, 15 Jun 2014 11:39:13 -0700
On Jun 14, 2014, at 4:20 PM, Maciej Piechotka <uzytkownik2 gmail com> wrote:
As a side question - why do you need volatile? In most cases it's not
needed (unless you write kernel/driver and do memory based I/O).
I've run into the issue calling functions with side effects. Here is a snippet of my code with the workaround:
/* Need to register types with the glib type system for dynamic
* construction with gtkbuilder. Need to figure out a better way
* to ensure the calls to typeof() are not optimized out.
*/
stdout.printf("Registering %s\n", typeof(AboutDialog).name());
stdout.printf("Registering %s\n", typeof(AddSimulationDialog).name());
stdout.printf("Registering %s\n", typeof(ArchiveSchematicsDialog).name());
stdout.printf("Registering %s\n", typeof(ExportBOMDialog).name());
stdout.printf("Registering %s\n", typeof(ExportNetlistDialog).name());
stdout.printf("Registering %s\n", typeof(NewDesignDialog).name());
stdout.printf("Registering %s\n", typeof(NewProjectDialog).name());
stdout.printf("Registering %s\n", typeof(RenumberRefdesDialog).name());
stdout.printf("Registering %s\n", typeof(ResetRefdesDialog).name());
stdout.printf("Registering %s\n", typeof(BackannotateRefdesDialog).name());
Cheers,
Ed
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]