Author vstinner
Recipients vstinner
Date 2018-11-28.00:12:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1543363954.23.0.788709270274.issue35333@psf.upfronthosting.co.za>
In-reply-to
Content
To prevent a compiler warning/error (on clang), I had modify Include/object.h and Include/pystate.h:

* Replace "PyTypeObject" with "struct _typeobject"
* Replace "PyInterpreterState" with "struct _is"
* Replace "PyThreadState" with "struct _ts"

=> see commit 9bdd2de84c1af55fbc006d3f892313623bd0195c of bpo-35134.

I propose to rename "struct _ts" to "struct PyThreadState" or "struct _PyThreadState", and do a similar change for "struct _ts" and "struct _typeobject". My intent is to make the Include/object.h and Include/pystate.h less surprising.

Maybe "struct _frame" should also be renamed to "struct _PyFrameObject"?

--

Python header files use many "private" C structures (struct):

struct _addr_pair
struct _arena PyArena
struct _ceval_runtime_state
struct _dictkeysobject
struct _err_stackitem
struct _frame
struct _gc_runtime_state
struct _gil_runtime_state gil
struct _heaptypeobject
struct _is
struct _longobject
struct _object
struct _odictobject PyODictObject
struct _pending_calls
struct _pycontextobject
struct _pycontexttokenobject
struct _pycontextvarobject
struct _symtable_entry
struct _traceback
struct _ts
struct _typeobject
struct _warnings_runtime_state
struct _xid
struct _xidregitem

The following structures are documented:

* struct _frozen:
  https://docs.python.org/dev/c-api/import.html#c._frozen
* struct _inittab:
  https://docs.python.org/dev/c-api/import.html#c._inittab
* struct _node:
  https://docs.python.org/dev/c-api/veryhigh.html#c.PyParser_SimpleParseString
History
Date User Action Args
2018-11-28 00:12:34vstinnersetrecipients: + vstinner
2018-11-28 00:12:34vstinnersetmessageid: <1543363954.23.0.788709270274.issue35333@psf.upfronthosting.co.za>
2018-11-28 00:12:34vstinnerlinkissue35333 messages
2018-11-28 00:12:34vstinnercreate