summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-29556: Remove unused #include <langinfo.h> (#98)Yen Chi Hsuan2017-02-151-4/+0
| | | | | | bltinmodule.c: Added in b744ba1 and no longer necessary since d64e8a7 posixmodule.c: Added in d1cd4d4 and no longer necessary since efb00c0 pythonrun.c: Added in 73d538b and no longer necessary since d600951 sysmodule.c: Added in 5467d4c and no longer necessary since a2c17c5
* Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE whereverSerhiy Storchaka2017-01-231-20/+10
| | | | possible. Patch is writen with Coccinelle.
* Use _PyObject_CallMethodIdObjArgs()Victor Stinner2016-12-081-1/+1
| | | | | | | | | Issue #28915: Replace _PyObject_CallMethodId() with _PyObject_CallMethodIdObjArgs() when the format string only use the format 'O' for objects, like "(O)". _PyObject_CallMethodIdObjArgs() avoids the code to parse a format string and avoids the creation of a temporary tuple.
* Use _PyObject_CallNoArg()Victor Stinner2016-12-061-1/+1
| | | | | | | Replace: PyObject_CallFunctionObjArgs(callable, NULL) with: _PyObject_CallNoArg(callable)
* Issue #28858: Remove _PyObject_CallArg1() macroVictor Stinner2016-12-051-1/+1
| | | | | | | | | | | Replace _PyObject_CallArg1(func, arg) with PyObject_CallFunctionObjArgs(func, arg, NULL) Using the _PyObject_CallArg1() macro increases the usage of the C stack, which was unexpected and unwanted. PyObject_CallFunctionObjArgs() doesn't have this issue.
* Backed out changeset b9c9691c72c5Victor Stinner2016-12-041-1/+1
| | | | | | Issue #28858: The change b9c9691c72c5 introduced a regression. It seems like _PyObject_CallArg1() uses more stack memory than PyObject_CallFunctionObjArgs().
* Add sys.getandroidapilevel()Victor Stinner2016-12-021-0/+18
| | | | | | | Issue #28740: Add sys.getandroidapilevel(): return the build time API version of Android as an integer. Function only available on Android.
* Replace PyObject_CallFunctionObjArgs() with fastcallVictor Stinner2016-12-011-1/+1
| | | | | | | | | | | | | | * PyObject_CallFunctionObjArgs(func, NULL) => _PyObject_CallNoArg(func) * PyObject_CallFunctionObjArgs(func, arg, NULL) => _PyObject_CallArg1(func, arg) PyObject_CallFunctionObjArgs() allocates 40 bytes on the C stack and requires extra work to "parse" C arguments to build a C array of PyObject*. _PyObject_CallNoArg() and _PyObject_CallArg1() are simpler and don't allocate memory on the C stack. This change is part of the fastcall project. The change on listsort() is related to the issue #23507.
* Remove CALL_PROFILE special buildVictor Stinner2016-11-281-1/+14
| | | | | | | | | | | Issue #28799: * Remove the PyEval_GetCallStats() function. * Deprecate the untested and undocumented sys.callstats() function. * Remove the CALL_PROFILE special build Use the sys.setprofile() function, cProfile or profile module to profile function calls.
* Added the const qualifier to char* variables that refer to readonly internalSerhiy Storchaka2016-11-201-2/+2
| | | | UTF-8 represenatation of Unicode objects.
* Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSizeSerhiy Storchaka2016-11-201-2/+2
|\ | | | | | | with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
| * Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSizeSerhiy Storchaka2016-11-201-2/+2
| | | | | | | | with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
* | Use PyThreadState_GET() in performance critical codeVictor Stinner2016-11-111-1/+2
|/ | | | | It seems like _PyThreadState_UncheckedGet() is not inlined as expected, even when using gcc -O3.
* Issue #28616: merge from 3.5Ned Deily2016-11-041-1/+1
|\
| * Issue #28616: Correct help for sys.version_info releaselevel component.Ned Deily2016-11-041-1/+1
| | | | | | | | Patch by Anish Tambe.
| * Issue #27932: Prevent memory leak in win32_ver().Steve Dower2016-09-181-0/+37
| |
* | Issue #27932: Prevent memory leak in win32_ver().Steve Dower2016-09-181-4/+42
| |
* | remove ceval timestamp supportBenjamin Peterson2016-09-091-30/+0
| |
* | Issue #28003: Fix a compiler warningYury Selivanov2016-09-091-1/+1
| |
* | Issue #28003: Implement PEP 525 -- Asynchronous Generators.Yury Selivanov2016-09-091-0/+119
| |
* | Issue #27781: Change file system encoding on Windows to UTF-8 (PEP 529)Steve Dower2016-09-081-2/+48
| |
* | Issue #27355: Removed support for Windows CE. It was never finished,Larry Hastings2016-09-051-5/+3
| | | | | | | | and Windows CE is no longer a relevant platform for Python.
* | Rename _PyObject_FastCall() to _PyObject_FastCallDict()Victor Stinner2016-08-221-2/+2
| | | | | | | | | | | | | | | | Issue #27809: * Rename _PyObject_FastCall() function to _PyObject_FastCallDict() * Add _PyObject_FastCall(), _PyObject_CallNoArg() and _PyObject_CallArg1() macros calling _PyObject_FastCallDict()
* | sys_pyfile_write_unicode() now uses fast callVictor Stinner2016-08-191-7/+2
| | | | | | | | Issue #27128.
* | call_trampoline() now uses fast callVictor Stinner2016-08-191-19/+10
| | | | | | | | Issue #27128.
* | - Issue #23968: Rename the platform directory from plat-$(MACHDEP) todoko@ubuntu.com2016-06-141-0/+10
| | | | | | | | | | | | | | | | plat-$(PLATFORM_TRIPLET). Rename the config directory (LIBPL) from config-$(LDVERSION) to config-$(LDVERSION)-$(PLATFORM_TRIPLET). Install the platform specifc _sysconfigdata module into the platform directory and rename it to include the ABIFLAGS.
* | Issue #17905: Do not guard locale include with HAVE_LANGINFO_H.Stefan Krah2016-04-251-1/+1
| |
* | Issue #22570: Renamed Py_SETREF to Py_XSETREF.Serhiy Storchaka2016-04-061-1/+1
|\ \ | |/
* | Add PYTHONMALLOC env varVictor Stinner2016-03-141-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Issue #26516: * Add PYTHONMALLOC environment variable to set the Python memory allocators and/or install debug hooks. * PyMem_SetupDebugHooks() can now also be used on Python compiled in release mode. * The PYTHONMALLOCSTATS environment variable can now also be used on Python compiled in release mode. It now has no effect if set to an empty string. * In debug mode, debug hooks are now also installed on Python memory allocators when Python is configured without pymalloc.
* | Merge 3.5Victor Stinner2016-01-201-1/+1
|\ \ | |/ | | | | Issue #26154: Add a new private _PyThreadState_UncheckedGet() function.
| * Add _PyThreadState_UncheckedGet()Victor Stinner2016-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Issue #20440: Cleaning up the code by using Py_SETREF.Serhiy Storchaka2016-01-051-4/+1
| |
* | Issue #25923: Added the const qualifier to static constant arrays.Serhiy Storchaka2015-12-251-2/+4
| |
* | sysmodule.c: reuse Py_STRINGIFY() macroVictor Stinner2015-11-051-6/+2
|/
* sys.setrecursionlimit() now raises RecursionErrorVictor Stinner2015-10-121-3/+26
| | | | | | | Issue #25274: sys.setrecursionlimit() now raises a RecursionError if the new recursion limit is too low depending at the current recursion depth. Modify also the "lower-water mark" formula to make it monotonic. This mark is used to decide when the overflowed flag of the thread state is reset.
* Issue 24017: Make PyEval_(Set|Get)CoroutineWrapper privateYury Selivanov2015-06-011-3/+3
|
* use our normal bracing styleBenjamin Peterson2015-05-121-1/+2
|
* Issue #24017: Plug ref leak.Yury Selivanov2015-05-121-2/+0
|
* PEP 0492 -- Coroutines with async and await syntax. Issue #24017.Yury Selivanov2015-05-121-0/+47
|
* Issue #23752: _Py_fstat() is now responsible to raise the Python exceptionVictor Stinner2015-03-301-1/+1
| | | | Add _Py_fstat_noraise() function when a Python exception is not welcome.
* Issue #23451: Update pyconfig.h for Windows to require Vista headers and ↵Steve Dower2015-03-021-0/+8
| | | | remove unnecessary version checks.
* Issue #23152: Implement _Py_fstat() to support files larger than 2 GB on ↵Steve Dower2015-02-211-2/+2
| | | | | | Windows. fstat() may fail with EOVERFLOW on files larger than 2 GB because the file size type is an signed 32-bit integer.
* Issue #23181: More "codepoint" -> "code point".Serhiy Storchaka2015-01-181-1/+1
|\
| * Issue #23181: More "codepoint" -> "code point".Serhiy Storchaka2015-01-181-1/+1
| |
* | Issue #22696: Add function :func:`sys.is_finalizing` to know about ↵Antoine Pitrou2014-12-071-0/+11
| | | | | | | | interpreter shutdown.
* | Issue #22869: Split pythonrun into two modulesNick Coghlan2014-11-201-1/+1
|/ | | | | | | - interpreter startup and shutdown code moved to a new pylifecycle.c module - Py_OptimizeFlag moved into the new module with the other global flags
* Issue #22193: Fixed integer overflow error in sys.getsizeof().Serhiy Storchaka2014-11-151-5/+10
| | | | Fixed an error in _PySys_GetSizeOf declaration.
* Issue #22193: Added private function _PySys_GetSizeOf() needed to implementSerhiy Storchaka2014-08-141-32/+40
| | | | some __sizeof__() methods.
* Issue #21891: remove extraneous semicolon.Ned Deily2014-07-011-1/+1
|
* Issue #13204: Calling sys.flags.__new__ would crash the interpreter, now it ↵Antoine Pitrou2014-04-281-3/+10
| | | | raises a TypeError.