cpython/Objects
Victor Stinner 50b48572d9
bpo-35081: Add _PyThreadState_GET() internal macro (GH-10266)
If Py_BUILD_CORE is defined, the PyThreadState_GET() macro access
_PyRuntime which comes from the internal pycore_state.h header.
Public headers must not require internal headers.

Move PyThreadState_GET() and _PyInterpreterState_GET_UNSAFE() from
Include/pystate.h to Include/internal/pycore_state.h, and rename
PyThreadState_GET() to _PyThreadState_GET() there.

The PyThreadState_GET() macro of pystate.h is now redefined when
pycore_state.h is included, to use the fast _PyThreadState_GET().

Changes:

* Add _PyThreadState_GET() macro
* Replace "PyThreadState_GET()->interp" with
  _PyInterpreterState_GET_UNSAFE()
* Replace PyThreadState_GET() with _PyThreadState_GET() in internal C
  files (compiled with Py_BUILD_CORE defined), but keep
  PyThreadState_GET() in the public header files.
* _testcapimodule.c: replace PyThreadState_GET() with
  PyThreadState_Get(); the module is not compiled with Py_BUILD_CORE
  defined.
* pycore_state.h now requires Py_BUILD_CORE to be defined.
2018-11-01 01:51:40 +01:00
..
clinic Add missing closing quote and trailing period in str.isidentifier() docstring (GH-9756) 2018-10-08 16:14:47 +05:30
stringlib bpo-34523: Support surrogatepass in locale codecs (GH-8995) 2018-08-29 22:21:32 +02:00
abstract.c bpo-35081: Add pycore_ prefix to internal header files (GH-10263) 2018-11-01 00:52:28 +01:00
accu.c Replace KB unit with KiB (#4293) 2017-11-08 14:44:44 -08:00
boolobject.c bpo-30592: Fixed error messages for some builtins. (#1996) 2017-06-08 14:41:19 +03:00
bytearrayobject.c bpo-35081: Add pycore_ prefix to internal header files (GH-10263) 2018-11-01 00:52:28 +01:00
bytes_methods.c closes bpo-34599: Improve performance of _Py_bytes_capitalize(). (GH-9083) 2018-09-06 21:54:49 -07:00
bytesobject.c bpo-35081: Add pycore_ prefix to internal header files (GH-10263) 2018-11-01 00:52:28 +01:00
call.c bpo-35081: Add _PyThreadState_GET() internal macro (GH-10266) 2018-11-01 01:51:40 +01:00
capsule.c
cellobject.c bpo-35081: Add pycore_ prefix to internal header files (GH-10263) 2018-11-01 00:52:28 +01:00
classobject.c bpo-35081: Add pycore_ prefix to internal header files (GH-10263) 2018-11-01 00:52:28 +01:00
codeobject.c bpo-35081: Add pycore_ prefix to internal header files (GH-10263) 2018-11-01 00:52:28 +01:00
complexobject.c bpo-35059: Convert PyObject_INIT() to function (GH-10077) 2018-10-26 14:35:00 +02:00
descrobject.c bpo-35081: Add pycore_ prefix to internal header files (GH-10263) 2018-11-01 00:52:28 +01:00
dict-common.h bpo-33312: Fix clang ubsan out of bounds warnings in dict. (GH-6537) 2018-04-19 22:41:19 -07:00
dictnotes.txt
dictobject.c bpo-35081: Add _PyThreadState_GET() internal macro (GH-10266) 2018-11-01 01:51:40 +01:00
enumobject.c bpo-33012: Fix invalid function cast warnings with gcc 8 for METH_NOARGS. (GH-6030) 2018-04-29 21:59:33 +03:00
exceptions.c bpo-35081: Add pycore_ prefix to internal header files (GH-10263) 2018-11-01 00:52:28 +01:00
fileobject.c bpo-33012: Fix invalid function cast warnings with gcc 8 for METH_NOARGS. (GH-6030) 2018-04-29 21:59:33 +03:00
floatobject.c bpo-35059: Convert PyObject_INIT() to function (GH-10077) 2018-10-26 14:35:00 +02:00
frameobject.c bpo-35081: Add pycore_ prefix to internal header files (GH-10263) 2018-11-01 00:52:28 +01:00
funcobject.c bpo-35081: Add pycore_ prefix to internal header files (GH-10263) 2018-11-01 00:52:28 +01:00
genobject.c bpo-35081: Add _PyThreadState_GET() internal macro (GH-10266) 2018-11-01 01:51:40 +01:00
iterobject.c bpo-35081: Add pycore_ prefix to internal header files (GH-10263) 2018-11-01 00:52:28 +01:00
listobject.c bpo-35081: Add pycore_ prefix to internal header files (GH-10263) 2018-11-01 00:52:28 +01:00
listsort.txt bpo-28685: Optimize sorted() list.sort() with type-specialized comparisons (#582) 2018-01-28 19:03:23 -08:00
lnotab_notes.txt bpo-28810: Update lnotab_notes.txt (#665) 2017-03-14 21:42:09 +02:00
longobject.c bpo-35064 prefix smelly symbols that appear with COUNT_ALLOCS with _Py_ (GH-10152) 2018-10-28 15:02:17 +00:00
memoryobject.c bpo-35081: Add pycore_ prefix to internal header files (GH-10263) 2018-11-01 00:52:28 +01:00
methodobject.c bpo-35081: Add pycore_ prefix to internal header files (GH-10263) 2018-11-01 00:52:28 +01:00
moduleobject.c bpo-35081: Add pycore_ prefix to internal header files (GH-10263) 2018-11-01 00:52:28 +01:00
namespaceobject.c Fix misleading mentions of tp_size in comments (GH-9093) 2018-09-10 09:46:08 -07:00
object.c bpo-35081: Add _PyThreadState_GET() internal macro (GH-10266) 2018-11-01 01:51:40 +01:00
obmalloc.c bpo-35081: Add pycore_ prefix to internal header files (GH-10263) 2018-11-01 00:52:28 +01:00
odictobject.c bpo-35081: Add _PyThreadState_GET() internal macro (GH-10266) 2018-11-01 01:51:40 +01:00
rangeobject.c Fix a possible crash in range.__reversed__(). (GH-10252) 2018-10-31 11:13:16 +02:00
README
setobject.c bpo-35081: Add pycore_ prefix to internal header files (GH-10263) 2018-11-01 00:52:28 +01:00
sliceobject.c bpo-35081: Add pycore_ prefix to internal header files (GH-10263) 2018-11-01 00:52:28 +01:00
structseq.c bpo-33012: Fix invalid function cast warnings with gcc 8 for METH_NOARGS. (GH-6030) 2018-04-29 21:59:33 +03:00
tupleobject.c bpo-35081: Add pycore_ prefix to internal header files (GH-10263) 2018-11-01 00:52:28 +01:00
typeobject.c bpo-35081: Add _PyThreadState_GET() internal macro (GH-10266) 2018-11-01 01:51:40 +01:00
typeslots.inc add Py_tp_finalize slot (closes #24345) 2015-06-01 10:12:48 -05:00
typeslots.py Issue #26662: Set PYTHON_FOR_GEN in configure 2016-07-26 12:48:08 +02:00
unicodectype.c Removed unintentional trailing spaces in non-external and non-generated C files. 2015-03-18 21:53:15 +02:00
unicodeobject.c bpo-35081: Add pycore_ prefix to internal header files (GH-10263) 2018-11-01 00:52:28 +01:00
unicodetype_db.h update to Unicode 11.0.0 (closes bpo-33778) (GH-7439) 2018-06-06 20:14:28 -07:00
weakrefobject.c bpo-33012: Fix invalid function cast warnings with gcc 8 for METH_NOARGS. (GH-6030) 2018-04-29 21:59:33 +03:00

Source files for various builtin objects