Method

GObjectValueset_object

Declaration [src]

void
g_value_set_object (
  GValue* value,
  GObject* v_object
)

Description [src]

Set the contents of a G_TYPE_OBJECT derived GValue to v_object.

g_value_set_object() increases the reference count of v_object (the GValue holds a reference to v_object). If you do not wish to increase the reference count of the object (i.e. you wish to pass your current reference to the GValue because you no longer need it), use g_value_take_object() instead.

It is important that your GValue holds a reference to v_object (either its own, or one it has taken) to ensure that the object won’t be destroyed while the GValue still exists).

Parameters

v_object

Type: GObject

Object value to be set.

The argument can be NULL.
The data is owned by the caller of the method.