since: 2.80


gi_type_info_argument_from_hash_pointer (
  GITypeInfo* info,
  void* hash_pointer,
  GIArgument* arg


Convert a data pointer from a GLib data structure to a GIArgument.

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 extracted from stuffed pointers, regardless of the machine‚Äôs architecture or endianness.

This function fills in the appropriate field of arg with the value extracted from hash_pointer, depending on the storage type of info.

Available since: 2.80



Type: void*

A pointer, such as a GHashTable data pointer.

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

Type: GIArgument

A GIArgument to fill in.

The argument will be set by the function.
The data is owned by the caller of the function.