cpython/Python
Victor Stinner bfd316e750 Add _PyThreadState_UncheckedGet()
Issue #26154: Add a new private _PyThreadState_UncheckedGet() function which
gets the current thread state, but don't call Py_FatalError() if it is NULL.

Python 3.5.1 removed the _PyThreadState_Current symbol from the Python C API to
no more expose complex and private atomic types. Atomic types depends on the
compiler or can even depend on compiler options. The new function
_PyThreadState_UncheckedGet() allows to get the variable value without having
to care of the exact implementation of atomic types.

Changes:

* Replace direct usage of the _PyThreadState_Current variable with a call to
  _PyThreadState_UncheckedGet().
* In pystate.c, replace direct usage of the _PyThreadState_Current variable
  with the PyThreadState_GET() macro for readability.
* Document also PyThreadState_Get() in pystate.h
2016-01-20 11:12:38 +01:00
..
clinic
_warnings.c Issue #20440: Massive replacing unsafe attribute setting code with special 2015-12-24 10:35:59 +02:00
asdl.c
ast.c Issue #25555: Fix parser and AST: fill lineno and col_offset of "arg" node when 2015-11-06 17:01:48 +01:00
bltinmodule.c Issue #24802: Merge null termination fixes from 3.4 into 3.5 2015-11-07 02:56:11 +00:00
ceval.c Issue #20440: Applied yet one patch for using Py_SETREF. 2015-12-27 12:36:18 +02:00
ceval_gil.h
codecs.c
compile.c Issue #20440: Massive replacing unsafe attribute setting code with special 2015-12-24 10:35:59 +02:00
condvar.h
dtoa.c
dup2.c
dynamic_annotations.c
dynload_aix.c
dynload_dl.c
dynload_hpux.c
dynload_next.c
dynload_shlib.c
dynload_stub.c
dynload_win.c
errors.c Add _PyThreadState_UncheckedGet() 2016-01-20 11:12:38 +01:00
fileutils.c Fix a couple of typos in code comments 2015-12-17 10:18:28 +00:00
formatter_unicode.c
frozen.c
frozenmain.c
future.c
getargs.c
getcompiler.c
getcopyright.c 2016 will be another year of writing copyrighted code 2016-01-01 10:23:45 -06:00
getopt.c
getplatform.c
getversion.c
graminit.c
import.c
importdl.c
importdl.h
importlib.h Issue #25280: Import trace messages emitted in verbose (-v) mode are no 2015-10-01 11:08:50 +03:00
importlib_external.h Issue #25280: Import trace messages emitted in verbose (-v) mode are no 2015-10-01 11:40:22 +03:00
makeopcodetargets.py
marshal.c Issue #25899: Converted non-ASCII characters in docstrings and manpage 2015-12-18 13:05:04 +02:00
modsupport.c
mysnprintf.c
mystrtoul.c
opcode_targets.h
peephole.c
pyarena.c
pyctype.c
pyfpe.c
pyhash.c
pylifecycle.c
pymath.c
pystate.c Add _PyThreadState_UncheckedGet() 2016-01-20 11:12:38 +01:00
pystrcmp.c
pystrhex.c
pystrtod.c
Python-ast.c Issue #25555: Fix parser and AST: fill lineno and col_offset of "arg" node when 2015-11-06 17:01:48 +01:00
pythonrun.c
pytime.c pytime.c: rename pygettimeofday_new() to pygettimeofday() 2015-11-10 12:11:39 +01:00
random.c Merge 3.4 (os.urandom) 2015-10-01 10:00:23 +02:00
README
sigcheck.c
strdup.c
structmember.c
symtable.c make recording and reporting errors and nonlocal and global directives more robust (closes #25973) 2015-12-29 10:08:34 -06:00
sysmodule.c Add _PyThreadState_UncheckedGet() 2016-01-20 11:12:38 +01:00
thread.c Issue #25523: Merge "a" to "an" fixes from 3.4 into 3.5 2015-11-02 04:04:57 +00:00
thread_foobar.h
thread_nt.h
thread_pthread.h
traceback.c

Miscellaneous source files for the main Python shared library