Ets_Obj_Map_Value_Set()
Abstract
Sets the value reference associated with the specified object handle key in the object mapping and registers a destroy procedure for the value.
Syntax
Ets_Obj_Map_Value_Set (EtsT_Obj_Map *obj_mptr, EtsT_Obj_Handle key_obj_hndl, const void *value_ptr, EtsT_Obj_Map_Value_Destroy_Proc value_destroy_proc)
Return Type
void
Header
ets_api_obj.h
Details
If there was already a value associated with the specified object handle key, that value is not identical with the new value reference, and that value had a registered destroy procedure, then that destroy procedure is called with that (old) value. If you do not want to call the old value's destroy procedure, first remove the old value (and its ownership) with Ets_Obj_Map_Value_Remove().
If you pass PRGC_NIL for the new value reference, the entry is removed from the mapping and the old value is destroyed.
The prototype for value_destroy_proc is given in EtsT_Obj_Map_Value_Destroy_Proc.