Remove an element from the table, but without actually releasing * the key, value and dictionary entry. The dictionary entry is returned * if the element was found (and unlinked from the table), and the user * should later call `dictFreeUnlinkedEntry()` with it in order to release it. * Otherwise if the key is not found, NULL is returned. * * This function is useful when we want to remove so
| 779 | * dictFreeUnlinkedEntry(entry); // <- This does not need to lookup again. |
| 780 | */ |
| 781 | dictEntry *dictUnlink(dict *ht, const void *key) { |
| 782 | return dictGenericDelete(ht,key,1); |
| 783 | } |
| 784 | |
| 785 | /* You need to call this function to really free the entry after a call |
| 786 | * to dictUnlink(). It's safe to call this function with 'he' = NULL. */ |
no test coverage detected