Serhiy Storchaka
89b5ea297d
[2.7] bpo-35441: Remove dead and buggy code related to PyList_SetItem(). (GH-11033) (GH-11234)
...
In _localemodule.c and selectmodule.c, remove dead code that would
cause double decrefs if run.
In addition, replace PyList_SetItem() with PyList_SET_ITEM() in cases
where a new list is populated and there is no possibility of an error.
In addition, check if the list changed size in the loop in array_array_fromlist().
(cherry picked from commit 99d56b5356 )
Co-authored-by: Zackery Spytz <zspytz@gmail.com >
2018-12-19 17:11:02 +02:00
Victor Stinner
1fd93ff18c
ceval.c: mark debug 'filename' variable as unused (GH-11074)
...
Use GCC __attribute__((unused)) to mark the debug variable 'filename'
as unused in Python/ceval.c.
2018-12-10 13:53:38 +01:00
Serhiy Storchaka
48c8bf21f9
[2.7] bpo-34234: Use _PyAnyInt_Check() and _PyAnyInt_CheckExact(). (GH-8479)
2018-07-31 09:09:36 +03:00
Xiang Zhang
34bb88dc5b
Clear possible exception before calling PyTuple_Pack in IMPORT_NAME (GH-6033)
2018-03-09 10:21:58 +08:00
INADA Naoki
2942b909d9
bpo-32616: Disable computed gotos by default for clang < 5 (GH-5574)
2018-02-07 19:09:36 +09:00
Xiang Zhang
05469fa1c0
bpo-30281: Fix the default value for stop in PySlice_Unpack() ( #1531 ) ( #1480 )
2017-05-10 19:20:28 +08:00
Serhiy Storchaka
079f21f873
bpo-29935: Fixed error messages in the index() method of tuple and list ( #887 ) ( #907 ) ( #910 )
...
when pass indices of wrong type.
(cherry picked from commit d4edfc9abf )
(cherry picked from commit bf4bb2e430 )
2017-03-30 20:32:18 +03:00
Serhiy Storchaka
9fbb65e646
bpo-29655: Fixed possible reference leaks in import *. ( #301 ) ( #510 )
...
Original patch by Matthias Bussonnier.
(cherry picked from commit 160edb4357 )
2017-03-08 13:44:33 +02:00
Xiang Zhang
b4f0e980b6
bpo-28598: Support __rmod__ for RHS subclasses of str in % string formatting operations (GH-366)
2017-03-01 14:28:14 +08:00
Raymond Hettinger
e62a694fee
Issue #26020 : Fix evaluation order for set literals
2016-09-08 15:25:19 -07:00
Martin Panter
0bb165ecc1
Issue #4806 : Avoid masking TypeError when *-unpacking a generator
...
Based on patch by Hagen Fürstenau.
2016-01-31 06:30:56 +00:00
Serhiy Storchaka
763a61ca95
Issue #26200 : Added Py_SETREF and replaced Py_XSETREF with Py_SETREF
...
in places where Py_DECREF was used.
2016-04-10 18:05:12 +03:00
Serhiy Storchaka
bc62af1bbe
Issue #22570 : Renamed Py_SETREF to Py_XSETREF.
2016-04-06 09:51:18 +03:00
Serhiy Storchaka
5951f2300f
Issue #20440 : Massive replacing unsafe attribute setting code with special
...
macro Py_SETREF.
2015-12-24 10:35:35 +02:00
Benjamin Peterson
14462d486b
remove tabs from ceval.c ( closes #24895 )
2015-08-19 20:38:39 -07:00
Serhiy Storchaka
1670af6c33
Added the const qualifier for char* argument of Py_EnterRecursiveCall().
2015-06-21 16:26:28 +03:00
Benjamin Peterson
cc06dbfc73
sync opcode prediction code with python 3
2015-06-01 18:24:31 -05:00
Benjamin Peterson
2c992a0788
backport computed gotos ( #4753 )
2015-05-28 12:45:31 -05:00
Victor Stinner
2b565bb6f3
Issue #18028 : Fix aliasing issue in READ_TIMESTAMP() of ceval.c on x86_64,
...
when Python is configure with --with-tsc. Patch written by Christian Heimes.
2014-12-12 13:19:00 +01:00
Antoine Pitrou
b9a4501179
Issue #21963 : backout issue #1856 patch (avoid crashes and lockups when
...
daemon threads run while the interpreter is shutting down; instead,
these threads are now killed when they try to take the GIL), as it seems
to break some existing code.
2014-11-21 02:04:21 +01:00
Serhiy Storchaka
a86c091a73
Issue #22453 : Fexed reference leaks when format error messages in ceval.c.
...
Warn against the use of leaking macro PyObject_REPR().
2014-11-19 00:11:05 +02:00
Benjamin Peterson
d2903bd682
restore runtime exec test ( #21591 )
2014-08-09 19:39:36 -07:00
Dirkjan Ochtman
9b1d670361
Issue #21591 : Handle exec backwards compatibility in the AST builder.
...
Instead of deferring until runtime. This makes sure we hit the right
conditions in dealing with unqualified exec statements.
Reviewed by Victor Stinner. Test follows in a later commit.
2014-07-29 17:21:39 +02:00
Benjamin Peterson
1c78e6d96f
check if the thread is finalizing after retaking the GIL
2014-06-16 22:59:07 -07:00
Benjamin Peterson
c0bc4eff50
avoid crashes and lockups from daemon threads during interpreter shutdown ( #1856 )
2014-06-16 19:39:18 -07:00