GBinding *binding)
{
const gchar *p_name;
- GValue source_value = { 0, };
- GValue target_value = { 0, };
+ GValue source_value = G_VALUE_INIT;
+ GValue target_value = G_VALUE_INIT;
gboolean res;
if (binding->is_frozen)
GBinding *binding)
{
const gchar *p_name;
- GValue source_value = { 0, };
- GValue target_value = { 0, };
+ GValue source_value = G_VALUE_INIT;
+ GValue target_value = G_VALUE_INIT;
gboolean res;
if (binding->is_frozen)
gpointer data)
{
TransformData *t_data = data;
- GValue params[3] = { { 0, }, { 0, }, { 0, } };
- GValue retval = { 0, };
+ GValue params[3] = { G_VALUE_INIT, G_VALUE_INIT, G_VALUE_INIT };
+ GValue retval = G_VALUE_INIT;
gboolean res;
g_value_init (¶ms[0], G_TYPE_BINDING);
gpointer data)
{
TransformData *t_data = data;
- GValue params[3] = { { 0, }, { 0, }, { 0, } };
- GValue retval = { 0, };
+ GValue params[3] = { G_VALUE_INIT, G_VALUE_INIT, G_VALUE_INIT };
+ GValue retval = G_VALUE_INIT;
gboolean res;
g_value_init (¶ms[0], G_TYPE_BINDING);
const GValue *value,
GObjectNotifyQueue *nqueue)
{
- GValue tmp_value = { 0, };
+ GValue tmp_value = G_VALUE_INIT;
GObjectClass *class = g_type_class_peek (pspec->owner_type);
guint param_id = PARAM_SPEC_PARAM_ID (pspec);
GParamSpec *redirect;
name = first_property_name;
while (name)
{
- GValue value = { 0, };
+ GValue value = G_VALUE_INIT;
GParamSpec *pspec;
gchar *error = NULL;
while (name)
{
- GValue value = { 0, };
+ GValue value = G_VALUE_INIT;
GParamSpec *pspec;
gchar *error;
G_OBJECT_TYPE_NAME (object));
else
{
- GValue *prop_value, tmp_value = { 0, };
+ GValue *prop_value, tmp_value = G_VALUE_INIT;
/* auto-conversion of the callers value type
*/
g_param_value_defaults (GParamSpec *pspec,
GValue *value)
{
- GValue dflt_value = { 0, };
+ GValue dflt_value = G_VALUE_INIT;
gboolean defaults;
g_return_val_if_fail (G_IS_PARAM_SPEC (pspec), FALSE);
GValue *dest_value,
gboolean strict_validation)
{
- GValue tmp_value = { 0, };
+ GValue tmp_value = G_VALUE_INIT;
g_return_val_if_fail (G_IS_PARAM_SPEC (pspec), FALSE);
g_return_val_if_fail (G_IS_VALUE (src_value), FALSE);
}
else
{
- GValue return_value = { 0, };
+ GValue return_value = G_VALUE_INIT;
gchar *error = NULL;
GType rtype = signal_return_type & ~G_SIGNAL_TYPE_STATIC_SCOPE;
gboolean static_scope = signal_return_type & G_SIGNAL_TYPE_STATIC_SCOPE;
signal_emit_unlocked_R (node, detail, instance, NULL, instance_and_params);
else
{
- GValue return_value = { 0, };
+ GValue return_value = G_VALUE_INIT;
gchar *error = NULL;
GType rtype = signal_return_type & ~G_SIGNAL_TYPE_STATIC_SCOPE;
gboolean static_scope = signal_return_type & G_SIGNAL_TYPE_STATIC_SCOPE;
GClosure *class_closure;
HandlerList *hlist;
Handler *handler_list = NULL;
- GValue *return_accu, accu = { 0, };
+ GValue *return_accu, accu = G_VALUE_INIT;
guint signal_id;
gulong max_sequential_handler_number;
gboolean return_value_altered = FALSE;
{
GClosure *closure = data;
- GValue params[2] = { { 0, }, { 0, } };
- GValue result_value = { 0, };
+ GValue params[2] = { G_VALUE_INIT, G_VALUE_INIT };
+ GValue result_value = G_VALUE_INIT;
gboolean result;
g_value_init (&result_value, G_TYPE_BOOLEAN);
source_closure_callback (gpointer data)
{
GClosure *closure = data;
- GValue result_value = { 0, };
+ GValue result_value = G_VALUE_INIT;
gboolean result;
g_value_init (&result_value, G_TYPE_BOOLEAN);
}
else if (g_value_type_transformable (G_VALUE_TYPE (value), G_TYPE_STRING))
{
- GValue tmp_value = { 0, };
+ GValue tmp_value = G_VALUE_INIT;
gchar *s;
g_value_init (&tmp_value, G_TYPE_STRING);
static void
test_boxed_ownership (void)
{
- GValue value = { 0, };
+ GValue value = G_VALUE_INIT;
static MyBoxed boxed = { 10, "bla" };
g_value_init (&value, MY_TYPE_BOXED);
{
GClosure *closure;
GClosure *closure2;
- GValue value = { 0, };
+ GValue value = G_VALUE_INIT;
g_value_init (&value, G_TYPE_CLOSURE);
g_assert (G_VALUE_HOLDS_BOXED (&value));
{
GDate *date;
GDate *date2;
- GValue value = { 0, };
+ GValue value = G_VALUE_INIT;
g_value_init (&value, G_TYPE_DATE);
g_assert (G_VALUE_HOLDS_BOXED (&value));
static void
test_boxed_value (void)
{
- GValue value1 = { 0, };
+ GValue value1 = G_VALUE_INIT;
GValue *value2;
- GValue value = { 0, };
+ GValue value = G_VALUE_INIT;
g_value_init (&value, G_TYPE_VALUE);
g_assert (G_VALUE_HOLDS_BOXED (&value));
{
GString *v;
GString *v2;
- GValue value = { 0, };
+ GValue value = G_VALUE_INIT;
g_value_init (&value, G_TYPE_GSTRING);
g_assert (G_VALUE_HOLDS_BOXED (&value));
{
GHashTable *v;
GHashTable *v2;
- GValue value = { 0, };
+ GValue value = G_VALUE_INIT;
g_value_init (&value, G_TYPE_HASH_TABLE);
g_assert (G_VALUE_HOLDS_BOXED (&value));
{
GArray *v;
GArray *v2;
- GValue value = { 0, };
+ GValue value = G_VALUE_INIT;
g_value_init (&value, G_TYPE_ARRAY);
g_assert (G_VALUE_HOLDS_BOXED (&value));
{
GPtrArray *v;
GPtrArray *v2;
- GValue value = { 0, };
+ GValue value = G_VALUE_INIT;
g_value_init (&value, G_TYPE_PTR_ARRAY);
g_assert (G_VALUE_HOLDS_BOXED (&value));
{
GRegex *v;
GRegex *v2;
- GValue value = { 0, };
+ GValue value = G_VALUE_INIT;
g_value_init (&value, G_TYPE_REGEX);
g_assert (G_VALUE_HOLDS_BOXED (&value));
{
GVariantType *v;
GVariantType *v2;
- GValue value = { 0, };
+ GValue value = G_VALUE_INIT;
g_value_init (&value, G_TYPE_VARIANT_TYPE);
g_assert (G_VALUE_HOLDS_BOXED (&value));
{
GDateTime *v;
GDateTime *v2;
- GValue value = { 0, };
+ GValue value = G_VALUE_INIT;
g_value_init (&value, G_TYPE_DATE_TIME);
g_assert (G_VALUE_HOLDS_BOXED (&value));
{
GError *v;
GError *v2;
- GValue value = { 0, };
+ GValue value = G_VALUE_INIT;
g_value_init (&value, G_TYPE_ERROR);
g_assert (G_VALUE_HOLDS_BOXED (&value));
GType type;
GEnumClass *class;
GEnumValue *val;
- GValue value = { 0, };
+ GValue value = G_VALUE_INIT;
type = g_enum_register_static ("MyEnum", my_enum_values);
GType type;
GFlagsClass *class;
GFlagsValue *val;
- GValue value = { 0, };
+ GValue value = G_VALUE_INIT;
type = g_flags_register_static ("MyFlags", my_flag_values);
/* The constructor is the one place where a GParamSpecOverride is visible
* to the outside world, so we do a bunch of checks here
*/
- GValue value1 = { 0, };
- GValue value2 = { 0, };
+ GValue value1 = G_VALUE_INIT;
+ GValue value2 = G_VALUE_INIT;
GParamSpec *pspec;
g_assert (n_construct_properties == 1);
{
GParamSpec *p, *p2;
GParamSpec *pp;
- GValue value = { 0, };
+ GValue value = G_VALUE_INIT;
g_value_init (&value, G_TYPE_PARAM);
g_assert (G_VALUE_HOLDS_PARAM (&value));
test_param_validate (void)
{
GParamSpec *p;
- GValue value = { 0, };
+ GValue value = G_VALUE_INIT;
p = g_param_spec_int ("my-int", "My Int", "Blurb", 0, 20, 10, G_PARAM_READWRITE);
test_param_convert (void)
{
GParamSpec *p;
- GValue v1 = { 0, };
- GValue v2 = { 0, };
+ GValue v1 = G_VALUE_INIT;
+ GValue v2 = G_VALUE_INIT;
p = g_param_spec_int ("my-int", "My Int", "Blurb", 0, 20, 10, G_PARAM_READWRITE);
g_value_init (&v1, G_TYPE_UINT);
static void
test_value_transform (void)
{
- GValue src = { 0, };
- GValue dest = { 0, };
+ GValue src = G_VALUE_INIT;
+ GValue dest = G_VALUE_INIT;
#define CHECK_INT_CONVERSION(type, getter, value) \
g_assert (g_value_type_transformable (G_TYPE_INT, type)); \
{
GObject *v;
GObject *v2;
- GValue value = { 0, };
+ GValue value = G_VALUE_INIT;
g_value_init (&value, G_TYPE_OBJECT);
{
GValueArray *a;
GValueArray *a2;
- GValue v = { 0, };
+ GValue v = G_VALUE_INIT;
GValue *p;
gint i;