Mercurial > cgi-bin > hgwebdir.cgi > VMS > C_Libraries > Hash_impl
changeset 17:774396bc53b4 MC_shared
updated for VMS name chgs from VMS__malloc to VMS_int__malloc
| author | Me@portablequad |
|---|---|
| date | Sun, 12 Feb 2012 01:46:00 -0800 |
| parents | 64a94ec0e2a4 |
| children | 520455c14c21 |
| files | PrivateHash.c |
| diffstat | 1 files changed, 9 insertions(+), 9 deletions(-) [+] |
line diff
1.1 --- a/PrivateHash.c Sat Feb 11 18:19:13 2012 -0800 1.2 +++ b/PrivateHash.c Sun Feb 12 01:46:00 2012 -0800 1.3 @@ -12,11 +12,11 @@ 1.4 HashTable * 1.5 makeHashTable( int numHashSlots, FreeEntryContentFnPtr freeFn ) 1.6 { HashTable * retTable; 1.7 - retTable = VMS__malloc( sizeof( HashTable ) ); 1.8 + retTable = VMS_int__malloc( sizeof( HashTable ) ); 1.9 1.10 retTable->freeEntryContentFn = freeFn; 1.11 1.12 - retTable->entries = VMS__malloc( numHashSlots * sizeof(HashEntry *) ); 1.13 + retTable->entries = VMS_int__malloc( numHashSlots * sizeof(HashEntry *) ); 1.14 retTable->numEntries = 0; 1.15 retTable->tableSz = numHashSlots; 1.16 1.17 @@ -34,7 +34,7 @@ 1.18 oldEntries = table->entries; 1.19 1.20 newTableSz = 2 * oldTableSz + 1; 1.21 - newEntries = VMS__malloc( newTableSz * sizeof(HashEntry *) ); 1.22 + newEntries = VMS_int__malloc( newTableSz * sizeof(HashEntry *) ); 1.23 1.24 table->tableSz = newTableSz; 1.25 table->entries = newEntries; 1.26 @@ -110,9 +110,9 @@ 1.27 hashEntry = getEntryFromTable( key, table ); 1.28 if( hashEntry == NULL ) 1.29 { hashIdx = hashThisKey( key, table->tableSz ); 1.30 - hashEntry = (HashEntry*) VMS__malloc( sizeof( HashEntry ) ); 1.31 + hashEntry = (HashEntry*) VMS_int__malloc( sizeof( HashEntry ) ); 1.32 if( hashEntry == NULL ) return 0; 1.33 - hashEntry->key = VMS__malloc( sizeof(hashkey_t) ); 1.34 + hashEntry->key = VMS_int__malloc( sizeof(hashkey_t) ); 1.35 if( hashEntry->key == NULL ) return 0; 1.36 memcpy( hashEntry->key, key, sizeof(hashkey_t) ); 1.37 hashEntry->next = (table->entries)[hashIdx]; 1.38 @@ -229,14 +229,14 @@ 1.39 { 1.40 if( entry->content != NULL ) 1.41 (*(table->freeEntryContentFn))( entry->content ); 1.42 - VMS__free( entry->key ); //was VMS__malloc'd above, so free it 1.43 - VMS__free( entry ); 1.44 + VMS_int__free( entry->key ); //was VMS__malloc'd above, so free it 1.45 + VMS_int__free( entry ); 1.46 } 1.47 1.48 void 1.49 freeHashEntryButNotContent( HashEntry *entry ) 1.50 { 1.51 - VMS__free( entry->key ); //was VMS__malloc'd above, so free it 1.52 - VMS__free( entry ); 1.53 + VMS_int__free( entry->key ); //was VMS__malloc'd above, so free it 1.54 + VMS_int__free( entry ); 1.55 } 1.56
