type_tag_hash_pointer_from_argument


Description:

[ CCode ( cname = "gi_type_tag_hash_pointer_from_argument" ) ]
[ Version ( since = "1.72" ) ]
public void* type_tag_hash_pointer_from_argument (TypeTag storage_type, Argument arg)

GLib data structures, such as List, SList, and GenericSet, 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 from_pointer.

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 storage_type.

Parameters:

storage_type

a TypeTag obtained from get_storage_type

arg

A Argument with the value to stuff into a pointer

Returns:

A stuffed pointer, that can be stored in a GenericSet, for example


Namespace: GI