8000 gh-111262: Re-add _PyDict_Pop() to have a C-API until a new public on… · scoder/cpython@794eb8a · GitHub
[go: up one dir, main page]

Skip to content

Commit 794eb8a

Browse files
committed
pythongh-111262: Re-add _PyDict_Pop() to have a C-API until a new public one is designed.
1 parent 8d46cb3 commit 794eb8a

File tree

5 files changed

+1
-6
lines changed

5 files changed

+1
-6
lines changed

Include/cpython/dictobject.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ static inline Py_ssize_t PyDict_GET_SIZE(PyObject *op) {
4646

4747
PyAPI_FUNC(int) PyDict_ContainsString(PyObject *mp, const char *key);
4848

49+
PyAPI_FUNC(PyObject *) _PyDict_Pop(PyObject *dict, PyObject *key, PyObject *default_value);
4950

5051
/* Dictionary watchers */
5152

Include/internal/pycore_dict.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ extern PyObject* _PyDict_NewPresized(Py_ssize_t minused);
4949
// Export for '_ctypes' shared extension
5050
PyAPI_FUNC(Py_ssize_t) _PyDict_SizeOf(PyDictObject *);
5151

52-
// Export for '_socket' shared extension (Windows remove_unusable_flags())
53-
PyAPI_FUNC(PyObject*) _PyDict_Pop(PyObject *, PyObject *, PyObject *);
54-
5552
#define _PyDict_HasSplitTable(d) ((d)->ma_values != NULL)
5653

5754
/* Like PyDict_Merge, but override can be 0, 1 or 2. If override is 0,

Modules/_threadmodule.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
/* Interface to Sjoerd's portable C thread library */
44

55
#include "Python.h"
6-
#include "pycore_dict.h" // _PyDict_Pop()
76
#include "pycore_interp.h" // _PyInterpreterState.threads.count
87
#include "pycore_moduleobject.h" // _PyModule_GetState()
98
#include "pycore_pyerrors.h" // _PyErr_WriteUnraisableMsg()

Modules/socketmodule.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ Local naming conventions:
107107

108108
#include "Python.h"
109109
#include "pycore_capsule.h" // _PyCapsule_SetTraverse()
110-
#include "pycore_dict.h" // _PyDict_Pop()
111110
#include "pycore_fileutils.h" // _Py_set_inheritable()
112111
#include "pycore_moduleobject.h" // _PyModule_GetState
113112

Python/import.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/* Module definition and import implementation */
22

33
#include "Python.h"
4-
#include "pycore_dict.h" // _PyDict_Pop()
54
#include "pycore_hashtable.h" // _Py_hashtable_new_full()
65
#include "pycore_import.h" // _PyImport_BootstrapImp()
76
#include "pycore_initconfig.h" // _PyStatus_OK()

0 commit comments

Comments
 (0)
0