Raymond Hettinger
1ce6885f8a
Fix compiler warning about obviously unreachable code.
2016-01-24 22:15:20 -08:00
Raymond Hettinger
306d6b1ea6
Convert another post-decrement while-loop to pre-decrement for consistency
...
and better generated code (on both GCC and CLang).
2016-01-24 12:40:42 -08:00
Raymond Hettinger
165eee214b
Convert two other post-decrement while-loops to pre-decrements for consistency
...
and for better code generation.
2016-01-24 11:32:07 -08:00
Raymond Hettinger
d84ec225bd
Miscellaneous refactorings
...
* Add comment to the maxlen structure entry about the meaning of maxlen == -1
* Factor-out code common to deque_append(left) and deque_extend(left)
* Factor inner-loop in deque_clear() to use only 1 test per loop instead of 2
* Tighten inner-loops for deque_item() and deque_ass_item() so that the
compiler can combine the decrement and test into a single step.
2016-01-24 09:12:06 -08:00
Benjamin Peterson
ae8c078dbb
merge 3.5
2016-01-21 22:04:04 -08:00
Benjamin Peterson
d52513cb22
merge 3.4
2016-01-21 22:03:55 -08:00
Benjamin Peterson
b1db758061
reject negative data_size
2016-01-21 22:02:46 -08:00
Benjamin Peterson
2b0b5ac5a0
merge 3.5 ( #26171 )
2016-01-20 22:25:40 -08:00
Benjamin Peterson
47b8ba22e3
merge 3.4 ( #26171 )
2016-01-20 22:25:06 -08:00
Benjamin Peterson
c4032da201
prevent buffer overflow in get_data ( closes #26171 )
2016-01-20 22:23:44 -08:00
Benjamin Peterson
ba77788bba
merge 3.5
2016-01-20 22:07:50 -08:00
Benjamin Peterson
d4d7737c3f
merge 3.4
2016-01-20 22:07:43 -08:00
Benjamin Peterson
ef9cf08352
fix refleak in error condition
2016-01-20 22:06:43 -08:00
Victor Stinner
b56837a033
Merge 3.5
...
Issue #26154 : Add a new private _PyThreadState_UncheckedGet() function.
2016-01-20 11:19:46 +01:00
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
Serhiy Storchaka
9cc4ed5c7a
Issue #26129 : Deprecated accepting non-integers in grp.getgrgid().
2016-01-18 18:49:57 +02:00
Georg Brandl
4b5b06203e
Fix indentation of continuation lines.
2016-01-18 08:00:15 +01:00
Stefan Krah
5f6ccc787e
Issue #26139 : libmpdec: disable /W4 warning (non-standard dllimport behavior).
2016-01-17 12:28:43 +01:00
Brett Cannon
43cfd8240c
Merge for issue #17633
2016-01-15 11:23:46 -08:00
Brett Cannon
56aae8f304
Issue #17633 : Improve support for namespace packages with zipimport.
...
Previously zipimport mistakenly limited namespace support to only the
top-level of the zipfile when it should have supported an arbitrary
depth.
Thanks to Phil Connel for the bug report and initial patch and Mike
Romberg for the final patch.
2016-01-15 11:22:19 -08:00
Brett Cannon
2f1a0b6ad5
Merge for issue #26114
2016-01-15 09:39:06 -08:00
Brett Cannon
45adb3100b
Issue #26114 : Remove a reference to 'Numerical Recipes'.
...
While no copyright violation occurred, the license which
'Numerical Recipes' operates under is not amenable to Python,
so to prevent confusion it's easier to simply remove its mention.
2016-01-15 09:38:24 -08:00
Benjamin Peterson
5db60aa84e
merge 3.5 ( closes #25672 )
2016-01-07 21:38:51 -08:00
Benjamin Peterson
3b1a8b3bbe
enable SSL_MODE_RELEASE_BUFFERS
...
Patch by Cory Benfield.
2016-01-07 21:37:37 -08:00
Serhiy Storchaka
576f132b98
Issue #20440 : Cleaning up the code by using Py_SETREF.
2016-01-05 21:27:54 +02:00
Benjamin Peterson
3e47a1337c
merge 3.5
2016-01-01 11:56:35 -06:00
Benjamin Peterson
4e3dd51396
merge 3.4
2016-01-01 11:56:16 -06:00
Benjamin Peterson
630329e4ea
merge 3.3
2016-01-01 11:55:47 -06:00
Benjamin Peterson
0e617e22f0
remove some copyright notices supserseded by the toplevel ones
2016-01-01 11:53:47 -06:00
Serhiy Storchaka
b5c7fc7a8e
Fixed formatting comman-line usage message.
2015-12-30 09:28:48 +02:00
Serhiy Storchaka
1ba01615de
Fixed formatting comman-line usage message.
2015-12-30 09:28:19 +02:00
Zachary Ware
bffa73e582
Issue #25972 , #20440 : Fix compilation on Windows
2015-12-28 21:51:02 -08:00
Stefan Krah
e3f359c71c
Merge.
2015-12-28 23:12:52 +01:00
Stefan Krah
53f2e0ad45
Issue #25928 : Add Decimal.as_integer_ratio(). Python parts and docs by
...
Mark Dickinson.
2015-12-28 23:02:02 +01:00
Serhiy Storchaka
e3a7d26aa6
Issue #25447 : Copying the lru_cache() wrapper object now always works,
...
independedly from the type of the wrapped object (by returning the original
object unchanged).
2015-12-28 23:59:09 +02:00
Serhiy Storchaka
e4d65e3aab
Issue #25447 : Copying the lru_cache() wrapper object now always works,
...
independedly from the type of the wrapped object (by returning the original
object unchanged).
2015-12-28 23:58:07 +02:00
Serhiy Storchaka
1ed017ae92
Issue #20440 : Cleaning up the code by using Py_SETREF and Py_CLEAR.
...
Old code is correct, but with Py_SETREF and Py_CLEAR it can be cleaner.
This patch doesn't fix bugs and hence there is no need to backport it.
2015-12-27 15:51:32 +02:00
Serhiy Storchaka
726fc139a5
Issue #20440 : More use of Py_SETREF.
...
This patch is manually crafted and contains changes that couldn't be handled
automatically.
2015-12-27 15:44:33 +02:00
Serhiy Storchaka
191321d11b
Issue #20440 : More use of Py_SETREF.
...
This patch is manually crafted and contains changes that couldn't be handled
automatically.
2015-12-27 15:41:34 +02:00
Serhiy Storchaka
bdb908ea54
Issue #20440 : Applied yet one patch for using Py_SETREF.
...
The patch is automatically generated, it replaces the code that uses Py_CLEAR.
2015-12-27 12:38:28 +02:00
Serhiy Storchaka
4a1e70fc31
Issue #20440 : Applied yet one patch for using Py_SETREF.
...
The patch is automatically generated, it replaces the code that uses Py_CLEAR.
2015-12-27 12:36:18 +02:00
Serhiy Storchaka
ef1585eb9a
Issue #25923 : Added more const qualifiers to signatures of static and private functions.
2015-12-25 20:01:53 +02:00
Serhiy Storchaka
2d06e84455
Issue #25923 : Added the const qualifier to static constant arrays.
2015-12-25 19:53:18 +02:00
Serhiy Storchaka
ea8c43152f
Issue #24103 : Fixed possible use after free in ElementTree.XMLPullParser.
2015-12-24 11:53:16 +02:00
Serhiy Storchaka
bc4ded9537
Issue #24103 : Fixed possible use after free in ElementTree.XMLPullParser.
2015-12-24 11:51:57 +02:00
Serhiy Storchaka
f006940351
Issue #20440 : Massive replacing unsafe attribute setting code with special
...
macro Py_SETREF.
2015-12-24 10:39:57 +02:00
Serhiy Storchaka
5a57ade58e
Issue #20440 : Massive replacing unsafe attribute setting code with special
...
macro Py_SETREF.
2015-12-24 10:35:59 +02:00
Serhiy Storchaka
060ed718ce
Issue #25869 : Optimized deepcopying ElementTree; it is now 20 times faster.
2015-12-21 12:57:27 +02:00
Serhiy Storchaka
22adf2ac02
Issue #25873 : Optimized iterating ElementTree.
...
Iterating elements Element.iter() is now 40% faster,
iterating text Element.itertext() is now up to 2.5 times faster.
2015-12-21 12:43:54 +02:00
Serhiy Storchaka
47a9d59d51
Issue #25902 : Fixed various refcount issues in ElementTree iteration.
2015-12-21 11:11:12 +02:00