2007-10-16 Tomas Frydrych <tf@o-hand.com>

* clutter.symbols:
	Added a bunch of missing symbols.
	
	* clutter/clutter-script.c:
	* json/json-node.c:
	Use g_slice_new0 instead of g_slice_new to avoid passing garbage to functions.
	
	* tests/test-threads.c:
	Replaced non-portable sleep() with g_usleep().
This commit is contained in:
Tomas Frydrych 2007-10-16 08:34:16 +00:00
parent 922a7e4d21
commit f8de77ac92
5 changed files with 24 additions and 11 deletions

View File

@ -1,3 +1,15 @@
2007-10-16 Tomas Frydrych <tf@o-hand.com>
* clutter.symbols:
Added a bunch of missing symbols.
* clutter/clutter-script.c:
* json/json-node.c:
Use g_slice_new0 instead of g_slice_new to avoid passing garbage to functions.
* tests/test-threads.c:
Replaced non-portable sleep() with g_usleep().
2007-10-15 Tomas Frydrych <tf@o-hand.com>
* clutter/cogl/gl/cogl-defines.h:

View File

@ -401,7 +401,7 @@ clutter_stage_set_title
clutter_stage_get_title
clutter_stage_set_user_resizable
clutter_stage_get_user_resizable
clutter_stage_get_key_focus
clutter_stage_set_key_focus
clutter_texture_error_quark
clutter_texture_get_type
clutter_texture_new
@ -485,6 +485,8 @@ clutter_score_is_playing
clutter_score_start
clutter_score_stop
clutter_score_remove_all
clutter_score_add
clutter_score_append
clutter_actor_flags_get_type
clutter_pack_type_get_type
clutter_modifier_type_get_type

View File

@ -330,7 +330,7 @@ construct_timeline (ClutterScript *script,
if (JSON_NODE_TYPE (node) == JSON_NODE_VALUE)
{
PropertyInfo *pinfo = g_slice_new (PropertyInfo);
PropertyInfo *pinfo = g_slice_new0 (PropertyInfo);
GValue value = { 0, };
pinfo->property_name = g_strdup (name);
@ -416,7 +416,7 @@ parse_member_to_property (ClutterScript *script,
switch (JSON_NODE_TYPE (node))
{
case JSON_NODE_VALUE:
retval = g_slice_new (PropertyInfo);
retval = g_slice_new0 (PropertyInfo);
retval->property_name = g_strdup (name);
json_node_get_value (node, &value);
@ -435,7 +435,7 @@ parse_member_to_property (ClutterScript *script,
JsonNode *val;
gboolean unref_timeline = FALSE;
retval = g_slice_new (PropertyInfo);
retval = g_slice_new0 (PropertyInfo);
retval->property_name = g_strdup (name);
alpha = clutter_alpha_new ();
@ -509,7 +509,7 @@ parse_member_to_property (ClutterScript *script,
}
}
retval = g_slice_new (PropertyInfo);
retval = g_slice_new0 (PropertyInfo);
retval->property_name = g_strdup (name);
g_value_init (&retval->value, CLUTTER_TYPE_MARGIN);
g_value_set_boxed (&retval->value, &margin);
@ -549,7 +549,7 @@ parse_member_to_property (ClutterScript *script,
}
}
retval = g_slice_new (PropertyInfo);
retval = g_slice_new0 (PropertyInfo);
retval->property_name = g_strdup (name);
g_value_init (&retval->value, CLUTTER_TYPE_PADDING);
g_value_set_boxed (&retval->value, &padding);
@ -574,7 +574,7 @@ parse_member_to_property (ClutterScript *script,
}
}
retval = g_slice_new (PropertyInfo);
retval = g_slice_new0 (PropertyInfo);
retval->property_name = g_strdup (name);
g_value_init (&retval->value, CLUTTER_TYPE_GEOMETRY);
g_value_set_boxed (&retval->value, &geom);

View File

@ -59,7 +59,7 @@ json_node_new (JsonNodeType type)
g_return_val_if_fail (type >= JSON_NODE_OBJECT && type <= JSON_NODE_NULL, NULL);
data = g_slice_new (JsonNode);
data = g_slice_new0 (JsonNode);
data->type = type;
return data;

View File

@ -1,6 +1,5 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h> /* sleep() */
#include <clutter/clutter.h>
typedef struct
@ -84,9 +83,9 @@ do_something_very_slow (void)
for (i = 0; i < 100; i++)
{
/* sleep for a while */
sleep(rand() / (RAND_MAX / 3) + 1);
g_usleep((rand() / (RAND_MAX / 3) + 1) * 1000000);
if ((i % 10) == 0)
if ((i % 10) == 0)
{
TestUpdate *update;