Method
GIRepositoryTypeInfohash_pointer_from_argument
since: 2.80
Declaration [src]
void*
gi_type_info_hash_pointer_from_argument (
GITypeInfo* info,
GIArgument* arg
)
Description [src]
Convert a GIArgument
to data pointer for use in a GLib
data structure.
GLib data structures, such as GList
, GSList
, and
GHashTable
, all store data pointers.
In the case where the list or hash table is storing single types rather than
structs, these data pointers may have values stuffed into them via macros
such as GPOINTER_TO_INT
.
Use this function to ensure that all values are correctly stuffed into pointers, regardless of the machine’s architecture or endianness.
This function returns a pointer stuffed with the appropriate field of arg
,
depending on the storage type of info
.
Available since: 2.80
Parameters
arg
-
Type:
GIArgument
A
GIArgument
with the value to stuff into a pointer.The data is owned by the caller of the method.
Return value
Type: void*
A stuffed pointer, that can be stored in a GHashTable
,
for example.
The returned data is owned by the instance. |
The return value can be NULL . |