From 58100059acb89179530036b4649f91cc679ea12b Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 22 Mar 2016 12:25:04 +0100 Subject: 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. --- Modules/hashtable.c | 3 +++ Modules/hashtable.h | 8 -------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Modules/hashtable.c b/Modules/hashtable.c index 7094b95..bb20cce 100644 --- a/Modules/hashtable.c +++ b/Modules/hashtable.c @@ -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 diff --git a/Modules/hashtable.h b/Modules/hashtable.h index eede038..41542d2 100644 --- a/Modules/hashtable.h +++ b/Modules/hashtable.h @@ -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 -- cgit v0.12