cookbook: Make example code C90 compliant

Modified all cookbook example code to prevent ISO C90 compliance
warnings occurring during compilation.
This commit is contained in:
Elliot Smith
2010-11-12 09:32:04 +00:00
parent 03a713e18e
commit f9d2310b72
16 changed files with 113 additions and 89 deletions

View File

@ -4,13 +4,16 @@
int
main (int argc, char *argv[])
{
clutter_init (&argc, &argv);
ClutterScript *ui = clutter_script_new ();
ClutterActor *stage;
ClutterScript *ui;
gchar *filename = "script-ui.json";
GError *error = NULL;
clutter_init (&argc, &argv);
ui = clutter_script_new ();
/* load a JSON file into the script */
clutter_script_load_from_file (ui, filename, &error);
@ -22,8 +25,6 @@ main (int argc, char *argv[])
}
/* retrieve objects from the script */
ClutterActor *stage;
clutter_script_get_objects (ui,
"stage", &stage,
NULL);