Add an element to the target hash table */
| 362 | |
| 363 | /* Add an element to the target hash table */ |
| 364 | int HashTableAdd |
| 365 | ( |
| 366 | dict *d, |
| 367 | void *key, |
| 368 | void *val |
| 369 | ) { |
| 370 | dictEntry *entry = HashTableAddRaw(d,key,NULL); |
| 371 | |
| 372 | if (!entry) return DICT_ERR; |
| 373 | HashTableSetVal(d, entry, val); |
| 374 | return DICT_OK; |
| 375 | } |
| 376 | |
| 377 | /* Low level add or find: |
| 378 | * This function adds the entry but instead of setting a value returns the |
no test coverage detected