summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2016-09-07 21:30:39 (GMT)
committerBrett Cannon <brett@python.org>2016-09-07 21:30:39 (GMT)
commitd0600ed524acb8b05b78d7399e8de136090703a0 (patch)
tree0af8898c64a9ec4d09fb4892c0cfedebf5fea400 /Include
parentd39206a78ce7279f26d23b6e721e4787a8ebf447 (diff)
downloadcpython-d0600ed524acb8b05b78d7399e8de136090703a0.zip
cpython-d0600ed524acb8b05b78d7399e8de136090703a0.tar.gz
cpython-d0600ed524acb8b05b78d7399e8de136090703a0.tar.bz2
Make PyCodeObject.co_extra even more private to force users through the proper API.
Diffstat (limited to 'Include')
-rw-r--r--Include/code.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/Include/code.h b/Include/code.h
index a054a92..b39d6bd 100644
--- a/Include/code.h
+++ b/Include/code.h
@@ -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 */