TutHashGetSize


Name

TutHashGetSize — return the number of entries in the hash table

Synopsis

T_INT4 TutHashGetSize(table) 
T_HASH_TABLE table; 

Arguments

table — hash table to get number of entries from

Return Values

Number of entries in the hash table

Diagnostics

None

Description

TutHashGetSize returns the number of entries in table. Because the count is maintained as part of the hash table, this function accesses that information rather than counting the entries in the table.

Caution

None

See Also

None

Examples

This example gets the number of entries in the hash table:

table = TutHashCreateStr(20); 
TutOut("size = %d\n", TutHashGetSize(table)); /* prints 0 */ 
TutHashInsert(table, "hi", "there"); 
TutOut("size = %d\n", TutHashGetSize(table)); /* prints 1 */ 

TIBCO SmartSockets™ Utilities
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com