TutHashBucketSetValue set the value in a hash bucket
bucket
the hash bucket to set value for
new_value
value to be stored in the bucket
The old value that was stored in the bucket.
None
TutHashBucketSetValue replaces the value stored in bucket
with new_value
. Before calling this function, obtain bucket
by calling TutHashLookupBucket. If the value is successfully replaced, TutHashBucketSetValue returns the old value that was stored in the bucket.
None
TutHashBucketGetValue, TutHashLookupBucket, TutHashReplace
This example sets the hash bucket value:
T_HASH_TABLE table; T_HASH_BUCKET bucket; table = TutHashCreateStr(20); TutHashInsert(table, "EAST", (T_PTR)1);/* look up the bucket that contains the entry for "EAST" */
bucket = TutHashLookupBucket(table, "EAST");/* replace the value in the bucket */
TutHashBucketSetValue(bucket, (T_PTR)2);
TIBCO SmartSockets™ Utilities Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |