[Insert name here] Reference Manual | ||||
---|---|---|---|---|
GanDataPrivate; GanData; GanData* gan_data_new (); GanData* gan_data_new_with_data (gconstpointer data, gsize bytes); GanData* gan_data_new_take_data (gpointer data, gsize bytes); GanData* gan_data_dup (const GanData *data); void gan_data_unref (GanData *data); void gan_data_assign (GanData *gan_data, gconstpointer data, gsize bytes); gconstpointer gan_data_get_data (const GanData *data); gpointer gan_data_copy_data (const GanData *data); gsize gan_data_get_bytes (const GanData *data);
GanData* gan_data_new_with_data (gconstpointer data, gsize bytes);
Create a new datum containing a copy of the specified value.
data : |
A pointer to the value to copy. |
bytes : |
The size of the value. |
Returns : | A new datum. |
GanData* gan_data_new_take_data (gpointer data, gsize bytes);
Create a new datum containing the specified value. The GanData takes over ownership of the memory and will free it on finalisation.
data : |
The pointer to the value to use. |
bytes : |
The size of the value. |
Returns : | A new datum. |
GanData* gan_data_dup (const GanData *data);
Duplicate a datum.
data : |
The datum to duplicate. |
Returns : | A new copy of data .
|
void gan_data_unref (GanData *data);
Decrement the GObject reference counter for a datum.
data : |
The datum whose reference counter to decrement. |
void gan_data_assign (GanData *gan_data, gconstpointer data, gsize bytes);
Assign a value to a datum.
gan_data : |
The datum to be assigned to. |
data : |
A pointer to the value to assign. |
bytes : |
The size of the value. |
gconstpointer gan_data_get_data (const GanData *data);
Get the value contained in a datum.
data : |
The datum whose value to get. |
Returns : | The value contained within data .
|
gpointer gan_data_copy_data (const GanData *data);
Copy the value contained in a datum. The caller takes responsibility for freeing the returned value.
data : |
The datum whose value to copy. |
Returns : | A copy of the value contained within data .
|