mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
gh-106320: Move private _PySet API to the internal API (#107041)
* Add pycore_setobject.h header file. * Move the following API to the internal C API: * _PySet_Dummy * _PySet_NextEntry() * _PySet_Update()
This commit is contained in:
parent
c92ef6fe0e
commit
5e4af2a3e9
18 changed files with 53 additions and 16 deletions
|
|
@ -95,4 +95,4 @@ PyAPI_FUNC(int) _PyMem_SetupAllocators(PyMemAllocatorName allocator);
|
|||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !Py_INTERNAL_PYMEM_H */
|
||||
#endif // !Py_INTERNAL_PYMEM_H
|
||||
|
|
|
|||
25
Include/internal/pycore_setobject.h
Normal file
25
Include/internal/pycore_setobject.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#ifndef Py_INTERNAL_SETOBJECT_H
|
||||
#define Py_INTERNAL_SETOBJECT_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef Py_BUILD_CORE
|
||||
# error "this header requires Py_BUILD_CORE define"
|
||||
#endif
|
||||
|
||||
// _pickle shared extension uses _PySet_NextEntry() and _PySet_Update()
|
||||
PyAPI_FUNC(int) _PySet_NextEntry(
|
||||
PyObject *set,
|
||||
Py_ssize_t *pos,
|
||||
PyObject **key,
|
||||
Py_hash_t *hash);
|
||||
PyAPI_FUNC(int) _PySet_Update(PyObject *set, PyObject *iterable);
|
||||
|
||||
// Export _PySet_Dummy for the gdb plugin's benefit
|
||||
PyAPI_DATA(PyObject *) _PySet_Dummy;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // !Py_INTERNAL_SETOBJECT_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue