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

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.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com