Changeset 1295 for trunk/psLib/src/sysUtils/psHash.c
- Timestamp:
- Jul 23, 2004, 5:31:22 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/sysUtils/psHash.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sysUtils/psHash.c
r1202 r1295 10 10 * @author George Gusciora, MHPCC 11 11 * 12 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-07- 08 22:05:14$12 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-07-24 03:31:06 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 357 357 itemFree: a function pointer 358 358 Return: 359 NONE359 boolean value defining success or failure 360 360 *****************************************************************************/ 361 361 bool psHashAdd(psHash *table, const char *key, void *data) … … 407 407 itemFree: a function pointer 408 408 Return: 409 The data that was associated with that key. 410 *****************************************************************************/ 411 void *psHashRemove(psHash *table, const char *key) 412 { 409 boolean value defining success or failure 410 *****************************************************************************/ 411 bool psHashRemove(psHash *table, const char *key) 412 { 413 void *data = NULL; 414 bool retVal = false; 415 413 416 if (table == NULL) { 414 417 psAbort(__func__, "psHashRemove() called with NULL hash table."); … … 418 421 } 419 422 420 return doHashWork(table, key, NULL, 1); 421 } 423 data = doHashWork(table, key, NULL, 1); 424 if ( data != NULL) { 425 psFree(data); 426 retVal = true; 427 } else { 428 retVal = false; 429 } 430 return retVal; 431 }
Note:
See TracChangeset
for help on using the changeset viewer.
