mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Make PyCodeObject.co_extra even more private to force users through the proper API.
This commit is contained in:
parent
d39206a78c
commit
d0600ed524
2 changed files with 35 additions and 33 deletions
|
@ -7,14 +7,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Holder for co_extra information */
|
||||
typedef struct {
|
||||
Py_ssize_t ce_size;
|
||||
void **ce_extras;
|
||||
} _PyCodeObjectExtra;
|
||||
|
||||
|
||||
/* Bytecode object */
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
|
@ -43,8 +35,10 @@ typedef struct {
|
|||
Objects/lnotab_notes.txt for details. */
|
||||
void *co_zombieframe; /* for optimization only (see frameobject.c) */
|
||||
PyObject *co_weakreflist; /* to support weakrefs to code objects */
|
||||
/* Scratch space for extra data relating to the code object */
|
||||
_PyCodeObjectExtra *co_extra;
|
||||
/* Scratch space for extra data relating to the code object.__icc_nan
|
||||
Type is a void* to keep the format private in codeobject.c to force
|
||||
people to go through the proper APIs. */
|
||||
void *co_extra;
|
||||
} PyCodeObject;
|
||||
|
||||
/* Masks for co_flags above */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue