I'm dealing with large numbers coming from the hash table. I'm wondering what would be a good way of adding them to a constant (100) taking into account portability. Glib's documentation highlights that using GINT_TO_POINTER is not portable in any way. Any ideas would be appreciated!
gpointer v, old_key;
gint value; // ?
if(g_hash_table_lookup_extended(table, key, &old_key, &v)){
value = GPOINTER_TO_INT(v); // ?
value = value + 100;
}
g_hash_table_replace(table, g_strdup(key), GINT_TO_POINTER(value)); // ?