cpython/Modules
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
..
_ctypes Issue #20440: More use of Py_SETREF. 2015-12-27 15:41:34 +02:00
_decimal Issue #25421: __sizeof__ methods of builtin types now use dynamic basic size. 2015-12-19 20:05:25 +02:00
_io Issue #20440: Applied yet one patch for using Py_SETREF. 2015-12-27 12:36:18 +02:00
_multiprocessing Issue #21704: Fix build error for _multiprocessing when semaphores 2014-07-28 23:01:02 +01:00
_sqlite Issue #20440: More use of Py_SETREF. 2015-12-27 15:41:34 +02:00
cjkcodecs Issue #20440: Applied yet one patch for using Py_SETREF. 2015-12-27 12:36:18 +02:00
clinic Issue #25626: Change zlib to accept Py_ssize_t and cap to UINT_MAX 2015-11-20 08:13:35 +00:00
expat Issue #25523: Correct "a" article to "an" article 2015-11-02 03:37:02 +00:00
zlib Issue #18527: Upgrade internal copy of zlib to 1.2.8 2013-10-21 12:03:09 +02:00
README Issue #18093: Factor out the programs that embed the runtime 2014-07-25 21:52:14 +10:00
Setup.config.in Issue #21076: the C signal module has been renamed to _signal 2014-04-04 16:30:04 +02:00
Setup.dist - merge 3.4 2015-04-13 22:00:30 +02:00
_bisectmodule.c Issue #19514: Deduplicate some _Py_IDENTIFIER declarations. 2013-11-07 18:46:53 +01:00
_bz2module.c Issue #20440: Applied yet one patch for using Py_SETREF. 2015-12-27 12:36:18 +02:00
_codecsmodule.c Issue #24824: Signatures of codecs.encode() and codecs.decode() now are 2015-08-09 12:23:08 +03:00
_collectionsmodule.c merge 3.4 2016-01-01 11:56:16 -06:00
_cryptmodule.c Use converter names instead of format units in Argument Clinic descriptions 2015-05-30 11:09:35 +03:00
_csv.c Issue #20440: Massive replacing unsafe attribute setting code with special 2015-12-24 10:35:59 +02:00
_curses_panel.c Issue #20440: Massive replacing unsafe attribute setting code with special 2015-12-24 10:35:59 +02:00
_cursesmodule.c Issue #4254: Adds _curses.update_lines_cols() Patch by Arnon Yaari 2015-04-15 18:06:05 -04:00
_datetimemodule.c Closes issue #23600: Wrong results from tzinfo.fromutc(). 2015-09-27 22:32:15 -04:00
_dbmmodule.c Issue #24000: Improved Argument Clinic's mapping of converters to legacy 2015-05-07 23:30:09 -07:00
_elementtree.c Issue #20440: More use of Py_SETREF. 2015-12-27 15:41:34 +02:00
_functoolsmodule.c Issue #25447: Copying the lru_cache() wrapper object now always works, 2015-12-28 23:58:07 +02:00
_gdbmmodule.c Issue #24000: Improved Argument Clinic's mapping of converters to legacy 2015-05-07 23:30:09 -07:00
_hashopenssl.c Issue #25523: Merge "a" to "an" fixes from 3.4 into 3.5 2015-11-02 04:04:57 +00:00
_heapqmodule.c Issue #24221: Small optimizations for heapq. 2015-05-22 00:41:57 -07:00
_json.c Issue #24683: Fixed crashes in _json functions called with arguments of 2015-07-26 09:02:23 +03:00
_localemodule.c Issue #23446: Use PyMem_New instead of PyMem_Malloc to avoid possible integer 2015-02-16 13:28:22 +02:00
_lsprof.c Issue #21863: cProfile now displays the module name of C extension functions, in addition to their own name. 2014-06-27 23:49:29 -04:00
_lzmamodule.c Issue #20440: Applied yet one patch for using Py_SETREF. 2015-12-27 12:36:18 +02:00
_math.c Fix typo. 2014-10-28 22:24:46 +01:00
_math.h
_opcode.c Issue #23501: Argumen Clinic now generates code into separate files by default. 2015-04-03 23:53:51 +03:00
_operator.c Issue #22955: Fixed reference leak in attrgetter.repr(). 2015-05-21 14:19:20 +03:00
_pickle.c Issue #20440: Applied yet one patch for using Py_SETREF. 2015-12-27 12:36:18 +02:00
_posixsubprocess.c Issue #25764: Merge subprocess fix from 3.4 into 3.5 2015-12-05 02:03:42 +00:00
_randommodule.c Issue #24620: Random.setstate() now validates the value of state last element. 2015-07-24 09:05:59 +03:00
_scproxy.c Issue #23685: Fix usage of PyMODINIT_FUNC in _json, _scproxy, nis, pyexpat 2015-03-17 17:48:27 +01:00
_sre.c Issue #20440: Massive replacing unsafe attribute setting code with special 2015-12-24 10:35:59 +02:00
_ssl.c enable SSL_MODE_RELEASE_BUFFERS 2016-01-07 21:37:37 -08:00
_ssl_data.h Issue #23248: Update ssl error codes from latest OpenSSL git master. 2015-01-18 17:39:32 +01:00
_stat.c Issue #21741: Add st_file_attributes to os.stat_result on Windows. 2014-06-19 09:46:37 -05:00
_struct.c Issue #20440: Applied yet one patch for using Py_SETREF. 2015-12-27 12:36:18 +02:00
_testbuffer.c Removed unintentional trailing spaces in non-external and non-generated C files. 2015-03-18 21:53:15 +02:00
_testcapimodule.c sys.setrecursionlimit() now raises RecursionError 2015-10-13 00:11:21 +02:00
_testimportmultiple.c
_testmultiphase.c Close #24748: Restore imp.load_dynamic compatibility 2015-09-05 21:05:05 +10:00
_threadmodule.c Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(), 2015-05-30 17:48:19 +03:00
_tkinter.c Issue #20035: Reimplement tkinter._fix module as a C function. 2015-05-22 11:36:53 -05:00
_tracemalloc.c Merge 3.4 (tracemalloc typo) 2015-03-18 16:05:32 +01:00
_weakref.c Issue #23501: Argumen Clinic now generates code into separate files by default. 2015-04-03 23:53:51 +03:00
_winapi.c Issue #20172: Update clinicizations to current clinic. 2015-05-13 10:58:35 -05:00
addrinfo.h
ar_beos
arraymodule.c Issue #25421: __sizeof__ methods of builtin types now use dynamic basic size. 2015-12-19 20:05:25 +02:00
atexitmodule.c Issue #25523: Merge "a" to "an" fixes from 3.4 into 3.5 2015-11-02 04:04:57 +00:00
audioop.c Issue #25523: Merge "a" to "an" fixes from 3.4 into 3.5 2015-11-02 04:04:57 +00:00
binascii.c Switch binascii over to using the common _Py_strhex implementation for its hex 2015-04-26 00:42:13 +00:00
cmathmodule.c Issue #24489: ensure a previously set C errno doesn't disturb cmath.polar(). 2015-06-23 14:38:13 +02:00
config.c.in PEP 489: Multi-phase extension module initialization 2015-05-23 22:24:10 +10:00
errnomodule.c
faulthandler.c Add _PyThreadState_UncheckedGet() 2016-01-20 11:12:38 +01:00
fcntlmodule.c Issue #23944: Argument Clinic now wraps long impl prototypes at column 78. 2015-04-14 18:07:59 -04:00
fpectlmodule.c Issue #16136: Remove VMS support and VMS-related code 2013-12-21 16:19:10 +01:00
fpetestmodule.c
gc_weakref.txt
gcmodule.c Issue #22117: The gc module now uses _PyTime_t timestamp 2015-03-27 17:47:53 +01:00
getaddrinfo.c Issue #15538: Fix compilation of the getnameinfo() / getaddrinfo() emulation code. 2012-08-02 20:37:12 +02:00
getbuildinfo.c
getnameinfo.c
getpath.c Issue #23731: Implement PEP 488. 2015-04-13 14:21:02 -04:00
grpmodule.c Issue #23501: Argumen Clinic now generates code into separate files by default. 2015-04-03 23:53:51 +03:00
hashlib.h Issue #25523: Correct "a" article to "an" article 2015-11-02 03:37:02 +00:00
hashtable.c Closes #21892, #21893: Use PY_FORMAT_SIZE_T instead of %zi or %zu to format C 2014-07-01 08:57:10 +02:00
hashtable.h Issue #21036: Fix typo in macro name 2014-03-24 22:34:34 +01:00
itertoolsmodule.c merge 3.4 2016-01-01 11:56:16 -06:00
ld_so_aix.in Removed trailing whitespaces in miscalenous files. 2015-04-03 19:42:32 +03:00
ld_so_beos
main.c Fixed formatting comman-line usage message. 2015-12-30 09:28:19 +02:00
makesetup Removed unintentional trailing spaces in text files. 2015-03-29 19:12:58 +03:00
makexp_aix
mathmodule.c Issue #26114: Remove a reference to 'Numerical Recipes'. 2016-01-15 09:38:24 -08:00
md5module.c Issue9951: update _hashopenssl and md5module to use _Py_strhex(). 2015-04-25 23:42:38 +00:00
mmapmodule.c Issue #25421: __sizeof__ methods of builtin types now use dynamic basic size. 2015-12-19 20:05:25 +02:00
nismodule.c Issue #23685: Fix usage of PyMODINIT_FUNC in _json, _scproxy, nis, pyexpat 2015-03-17 17:48:27 +01:00
ossaudiodev.c Issue #23709, #23001: ossaudiodev now uses Py_ssize_t for sizes instead of int 2015-03-20 10:37:34 +01:00
overlapped.c asyncio, _overlapped.ConnectPipe(): release the GIL 2015-01-26 22:43:39 +01:00
parsermodule.c Issue #25421: __sizeof__ methods of builtin types now use dynamic basic size. 2015-12-19 20:05:25 +02:00
posixmodule.c Issue #25846: Fix usage of Py_ARRAY_LENGTH() in win32_wchdir() (new try) 2015-12-14 00:21:50 +01:00
posixmodule.h
pwdmodule.c Issue #23501: Argumen Clinic now generates code into separate files by default. 2015-04-03 23:53:51 +03:00
pyexpat.c Raise more correct exception on overflow in setting buffer_size attribute of 2015-09-07 22:54:08 +03:00
readline.c Issue #25523: Merge "a" to "an" fixes from 3.4 into 3.5 2015-11-02 04:04:57 +00:00
resource.c Issue #19343: Expose FreeBSD-specific APIs in resource module. Original patch by Koobs. 2013-12-08 14:35:55 +01:00
rotatingtree.c
rotatingtree.h
selectmodule.c merge 3.4 (#25371) 2015-10-10 19:32:33 -07:00
sha1module.c Implements issue #9951: Adds a hex() method to bytes, bytearray, & memoryview. 2015-04-25 23:22:26 +00:00
sha256module.c Implements issue #9951: Adds a hex() method to bytes, bytearray, & memoryview. 2015-04-25 23:22:26 +00:00
sha512module.c Implements issue #9951: Adds a hex() method to bytes, bytearray, & memoryview. 2015-04-25 23:22:26 +00:00
signalmodule.c Issue #20440: Massive replacing unsafe attribute setting code with special 2015-12-24 10:35:59 +02:00
socketmodule.c Close #24784: Fix compilation without thread support 2015-10-11 09:54:42 +02:00
socketmodule.h Issue #22117: The socket module uses _PyTime_t timestamp for timeouts 2015-03-28 01:18:54 +01:00
spwdmodule.c Issue #23501: Argumen Clinic now generates code into separate files by default. 2015-04-03 23:53:51 +03:00
sre.h Issue #17381: Fixed handling of case-insensitive ranges in regular expressions. 2014-10-31 12:36:56 +02:00
sre_constants.h Issue #17381: Fixed handling of case-insensitive ranges in regular expressions. 2014-10-31 12:36:56 +02:00
sre_lib.h Issue #18684: Fixed reading out of the buffer in the re module. 2015-07-06 14:03:01 +03:00
symtablemodule.c remove the concept of an unoptimized function scope from the compiler, since it can't happen anymore 2015-04-27 21:44:22 -04:00
syslogmodule.c Issue #20437: Fixed 22 potential bugs when deleting objects references. 2014-02-09 13:46:20 +02:00
termios.c
testcapi_long.h
timemodule.c Issue #25092: Fix datetime.strftime() failure when errno was already set to EINVAL. 2015-09-22 14:51:42 -07:00
tkappinit.c Issue #4350: Removed a number of out-of-dated and non-working for a long time 2014-07-23 22:33:50 +03:00
tkinter.h Issue #16840. Turn off bignum support in tkinter with with Tcl earlier than 8.5.8 2015-04-22 10:59:32 +03:00
unicodedata.c upgrade to Unicode 8.0.0 2015-06-27 15:45:56 -05:00
unicodedata_db.h upgrade to Unicode 8.0.0 2015-06-27 15:45:56 -05:00
unicodename_db.h upgrade to Unicode 8.0.0 2015-06-27 15:45:56 -05:00
winreparse.h Issue18314 Allow unlink to remove junctions. Includes support for creating junctions. Patch by Kim Gräsman 2014-05-05 19:46:17 +01:00
xxlimited.c Issue #24373: Eliminate PEP 489 test refleaks 2015-06-04 21:52:57 +10:00
xxmodule.c PEP 489: Multi-phase extension module initialization 2015-05-23 22:24:10 +10:00
xxsubtype.c PEP 489: Multi-phase extension module initialization 2015-05-23 22:24:10 +10:00
zipimport.c Issue #17633: Improve support for namespace packages with zipimport. 2016-01-15 11:22:19 -08:00
zlibmodule.c Issue #20440: More use of Py_SETREF. 2015-12-27 15:41:34 +02:00

README

Source files for standard library extension modules,
and former extension modules that are now builtin modules.