Remove _Py_hashtable_delete()

Issue #26588: Remove _Py_hashtable_delete() from hashtable.h since the function
is not used. Keep the C code in hashtable.c as commented code if someone needs
it later.
This commit is contained in:
Victor Stinner 2016-03-22 12:25:04 +01:00
parent c9553876ae
commit 58100059ac
2 changed files with 3 additions and 8 deletions

View File

@ -364,6 +364,8 @@ _Py_hashtable_pop(_Py_hashtable_t *ht, size_t key_size, const void *pkey,
}
/* Code commented since the function is not needed in Python */
#if 0
void
_Py_hashtable_delete(_Py_hashtable_t *ht, size_t key_size, const void *pkey)
{
@ -374,6 +376,7 @@ _Py_hashtable_delete(_Py_hashtable_t *ht, size_t key_size, const void *pkey)
(void)_Py_hashtable_pop_entry(ht, key_size, pkey, NULL, 0);
#endif
}
#endif
int

View File

@ -193,13 +193,5 @@ PyAPI_FUNC(int) _Py_hashtable_pop(
_Py_hashtable_pop(TABLE, sizeof(KEY), &(KEY), sizeof(DATA), &(DATA))
/* Delete an entry.
WARNING: The entry must exist. */
PyAPI_FUNC(void) _Py_hashtable_delete(
_Py_hashtable_t *ht,
size_t key_size,
const void *pkey);
#endif /* Py_LIMITED_API */
#endif