ext/iodine/fiobj_hash.c
/**
 * Sets a key-value pair in the Hash, duplicating the Symbol and **moving**
 * the ownership of the object to the Hash.
 *
 * Returns -1 on error.
 */
Sets a key-value pair in the Hash, duplicating the Symbol and **moving
the ownership of the object to the Hash.

1 on error.
Sets a key - value pair in the Hash duplicating the Symbol and ** moving the ownership of the object to the Hash . 1 on error .
int fiobj_hash_set(FIOBJ hash, FIOBJ key, FIOBJ obj) {
  assert(hash && FIOBJ_TYPE_IS(hash, FIOBJ_T_HASH));
  if (FIOBJ_TYPE_IS(key, FIOBJ_T_STRING))
    fiobj_str_freeze(key);
  fio_hash___insert(&obj2hash(hash)->hash, fiobj_obj2hash(key), key, obj, NULL);
  fiobj_free(obj); 
  return 0;
}
int fiobj_hash_set ( FIOBJ hash , FIOBJ key , FIOBJ obj ) { assert ( hash && FIOBJ_TYPE_IS ( hash , FIOBJ_T_HASH ) ) ; if ( FIOBJ_TYPE_IS ( key , FIOBJ_T_STRING ) ) fiobj_str_freeze ( key ) ; fio_hash___insert ( & obj2hash ( hash ) -> hash , fiobj_obj2hash ( key ) , key , obj , NULL ) ; fiobj_free ( obj ) ; return 0 ; }
Sets a key-value pair in the Hash, duplicating the Symbol and **moving
 the ownership of the object to the Hash.
Sets a key - value pair in the Hash duplicating the Symbol and ** moving the ownership of the object to the Hash .
/* take ownership - free the user's reference. */