mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
Clean up.
This commit is contained in:
parent
cfa6fe9d48
commit
b38b8b8b50
4 changed files with 12 additions and 7 deletions
|
|
@ -80,11 +80,14 @@ struct PyMemberDef {
|
|||
#define _Py_T_NONE 20 // Deprecated. Value is always None.
|
||||
|
||||
/* Flags */
|
||||
#define Py_READONLY 1
|
||||
#define Py_AUDIT_READ 2 // Added in 3.10, harmless no-op before that
|
||||
#define _Py_WRITE_RESTRICTED 4 // Deprecated, no-op. Do not reuse the value.
|
||||
#define Py_RELATIVE_OFFSET 8
|
||||
#define _Py_AFTER_ITEMS 16
|
||||
#define Py_READONLY (1 << 0)
|
||||
#define Py_AUDIT_READ (1 << 1) // Added in 3.10, harmless no-op before that
|
||||
#define _Py_WRITE_RESTRICTED (1 << 2) // Deprecated, no-op. Do not reuse the value.
|
||||
#define Py_RELATIVE_OFFSET (1 << 3)
|
||||
|
||||
#ifndef Py_LIMITED_API
|
||||
# define _Py_AFTER_ITEMS (1 << 4) // For internal use.
|
||||
#endif
|
||||
|
||||
PyAPI_FUNC(PyObject *) PyMember_GetOne(const char *, PyMemberDef *);
|
||||
PyAPI_FUNC(int) PyMember_SetOne(char *, PyMemberDef *, PyObject *);
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ typedef propertyobject _PyPropertyObject;
|
|||
|
||||
extern PyTypeObject _PyMethodWrapper_Type;
|
||||
|
||||
extern void *_PyMember_GetOffset(PyObject *, PyMemberDef *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#include "pycore_abstract.h" // _PySequence_IterSearch()
|
||||
#include "pycore_call.h" // _PyObject_VectorcallTstate()
|
||||
#include "pycore_code.h" // CO_FAST_FREE
|
||||
#include "pycore_descrobject.h" // _PyMember_GetOffset()
|
||||
#include "pycore_dict.h" // _PyDict_KeysSize()
|
||||
#include "pycore_function.h" // _PyFunction_GetVersionForCurrentState()
|
||||
#include "pycore_interpframe.h" // _PyInterpreterFrame
|
||||
|
|
@ -2568,8 +2569,6 @@ _PyHeapType_GET_MEMBERS(PyHeapTypeObject* type)
|
|||
return PyObject_GetItemData((PyObject *)type);
|
||||
}
|
||||
|
||||
void *_PyMember_GetOffset(PyObject *obj, PyMemberDef *l);
|
||||
|
||||
static int
|
||||
traverse_slots(PyTypeObject *type, PyObject *self, visitproc visit, void *arg)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "Python.h"
|
||||
#include "pycore_abstract.h" // _PyNumber_Index()
|
||||
#include "pycore_descrobject.h" // _PyMember_GetOffset()
|
||||
#include "pycore_long.h" // _PyLong_IsNegative()
|
||||
#include "pycore_object.h" // _Py_TryIncrefCompare(), FT_ATOMIC_*()
|
||||
#include "pycore_critical_section.h"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue