Christian Heimes
43d82df406
Now all error paths of _freeze_importlib use 'goto error' and the error label cleans up all used resources.
2013-07-21 23:05:04 +02:00
Christian Heimes
71945880fb
Issue #18514 : Fix unreachable Py_DECREF() call in PyCData_FromBaseObj()
2013-07-21 16:25:30 +02:00
Christian Heimes
8c4c1f6e66
Issue #18514 : Fix unreachable Py_DECREF() call in PyCData_FromBaseObj()
2013-07-21 16:24:51 +02:00
Christian Heimes
992fe2ab84
Fix reference and memory leaks in _freeze_importlib
2013-07-21 16:19:16 +02:00
Christian Heimes
96f628f487
Fix reference and memory leaks in _freeze_importlib
2013-07-21 16:19:02 +02:00
Victor Stinner
41801f5812
Issue #18519 , #18408 : Fix sqlite authorizer callback
...
If a previous call to the authorizer callback failed and raised an exception,
don't call the Python authorizer callback, but just return SQLITE_DENY.
2013-07-21 13:05:38 +02:00
Raymond Hettinger
b97cc49c3a
Minor code simplification by eliminating an unnecessary temporary variable.
2013-07-21 01:51:07 -07:00
Christian Heimes
603bd2d374
Check return value of PyEval_GetGlobals() for NULL
...
CID 486814
2013-07-20 22:54:39 +02:00
Christian Heimes
a6404ad43c
Check return value of PyEval_GetGlobals() for NULL
...
CID 486814
2013-07-20 22:54:25 +02:00
Christian Heimes
5df8ff01d9
Check return value of flush_character_buffer()
...
CID 486663
2013-07-20 22:42:06 +02:00
Christian Heimes
09994a9c59
Check return value of flush_character_buffer()
...
CID 486663
2013-07-20 22:41:58 +02:00
Mark Dickinson
60d634ae4a
Issue #18513 : Add workaround for OS X 10.8 cexp bug that leads to wrong cmath.rect(0.0,-0.0) results.
2013-07-20 18:00:06 +01:00
Mark Dickinson
58ceecfe5a
Issue #18513 : Add workaround for OS X 10.8 cexp bug that leads to wrong cmath.rect(0.0,-0.0) results.
2013-07-20 17:59:13 +01:00
Christian Heimes
2ef710e40f
Add missing check of PyDict_Update()'s return value in _elementtree.c
...
CID 719637
2013-07-20 15:12:19 +02:00
Christian Heimes
7ed4294d7f
Add missing check of PyDict_Update()'s return value in _elementtree.c
...
CID 719637
2013-07-20 15:12:09 +02:00
Christian Heimes
3f95bdcdbe
Add missing check of PyDict_SetItem()'s return value
...
CID 486659
2013-07-20 15:01:36 +02:00
Christian Heimes
97cb67b9ca
Add missing check of PyDict_SetItem()'s return value
...
CID 486659
2013-07-20 15:01:26 +02:00
Christian Heimes
abfc4d838a
Fix fishy sizeof(Py_ssize_t *).
...
sizeof(Py_ssize_t *) == sizeof(Py_ssize_t) but it's not a portable assumption.
CID 486403
2013-07-20 14:11:52 +02:00
Christian Heimes
e91ad501c5
Use strncat() instead of strcat() to silence some warnings.
...
CID 486616, CID 486617, CID 486615
2013-07-20 14:11:28 +02:00
Raymond Hettinger
5ea0f80165
Make the GCC-4.8 compiler happy by moving declarations to the top of the function.
2013-07-19 19:52:04 -07:00
Ronald Oussoren
ced1226cce
(3.3->default): #18480 : Add missing PyType_Ready call to _elementtree extension
2013-07-19 11:14:05 +02:00
Ronald Oussoren
138d080a28
#18480 : Add missing PyType_Ready call to _elementtree extension
2013-07-19 11:11:25 +02:00
Victor Stinner
d85032e25d
(Merge 3.3) Fix posix_chflags(): return_value was uninitialized when
...
follow_symlinks=False whereas the fchmodat() function is not avaialble.
2013-07-18 23:58:08 +02:00
Victor Stinner
45e90394e7
Fix posix_chflags(): return_value was uninitialized when follow_symlinks=False
...
whereas the fchmodat() function is not avaialble.
2013-07-18 23:57:35 +02:00
Victor Stinner
9e09c26e8a
Issue #18501 , #18408 : Fix expat handlers in pyexpat, don't call Python
...
functions if a Python exception was raised
2013-07-18 23:17:01 +02:00
Victor Stinner
3fd8cbd5e4
Issue #18408 : Fix _elementtree.c, don't call Python function from an expat
...
handler if a Python exception is set
2013-07-18 22:46:14 +02:00
Victor Stinner
ca713c014e
Fix a compiler warning on FreeBSD
...
Modules/python.c:40: warning: ISO C90 forbids mixed declarations and code
2013-07-18 02:43:47 +02:00
Victor Stinner
569f364017
Issue #18408 : Fix PyInit__curses_panel(), handle import_curses() failure
...
Don't call PyErr_NewException() if an exception is set, or type_call() would
fail with an assertion error.
2013-07-18 02:31:21 +02:00
Victor Stinner
4abda5d5b0
Issue #18408 : Fix _pysqlite_fetch_one_row(), in debug mode, don't call
...
type_call() with an exception set
2013-07-18 01:54:37 +02:00
Victor Stinner
ace47d7efd
Issue #18408 : PyEval_EvalFrameEx() and PyEval_CallObjectWithKeywords() now fail
...
with an assertion error if they are called with an exception set
(PyErr_Occurred()).
If these functions are called with an exception set, the exception may be
cleared and so the caller looses its exception.
Add also assertions to PyEval_CallObjectWithKeywords() and call_function() to
check if the function succeed with no exception set, or the function failed
with an exception set.
2013-07-18 01:41:08 +02:00
Victor Stinner
e9af4cface
Issue #18488 : _pysqlite_final_callback() should not clear the exception set by
...
the last call to the step() method of a user function
2013-07-18 01:42:04 +02:00
Victor Stinner
4755beac3c
Issue #18408 : Fix array_tolist(), handle PyList_SetItem() failure
2013-07-18 01:12:35 +02:00
Victor Stinner
0b142e2809
Issue #18408 : Fix array_index(), handle getarrayitem() failure
2013-07-17 23:01:30 +02:00
Victor Stinner
764a46d2ed
Issue #18408 : Fix heapq.heappop(), handle PyList_SetSlice() failure
2013-07-17 21:50:21 +02:00
Victor Stinner
2ff51b83b8
Issue #18408 : Fix time.tzset(), detect exception when calling PyInit_timezone()
2013-07-17 21:42:45 +02:00
Victor Stinner
d594f24fbc
Issue #18408 : Fix locale.localeconv(), handle PyDict_SetItemString() failure
2013-07-17 00:55:57 +02:00
Victor Stinner
6684bdf73d
Issue #18408 : Fix typo in build_node_tree() of the parser module
...
Type "o" format of Py_BuildValue() is invalid: it must be "O".
2013-07-17 00:13:52 +02:00
Victor Stinner
1e53bbaced
Issue #18408 : handle PySys_GetObject() failure, raise a RuntimeError
2013-07-16 22:26:05 +02:00
Victor Stinner
d1f9942ae3
Issue #18408 : Fix cjkcodecs decoders, add a new MBERR_EXCEPTION constant to
...
notify exceptions raised by the _PyUnicodeWriter API
2013-07-16 21:41:43 +02:00
Victor Stinner
85c761d3d3
Issue #18408 : Fix fileio_read() on _PyBytes_Resize() failure
...
bytes is NULL on _PyBytes_Resize() failure
2013-07-16 21:36:02 +02:00
Victor Stinner
a4ced86f03
Issue #18408 : random_seed() now raises a MemoryError on memory allocation
...
failure
2013-07-15 20:00:36 +02:00
Victor Stinner
33283ba300
Issue #18408 : Fix CJK decoders, raise MemoryError on memory allocation failure
2013-07-15 17:47:39 +02:00
Victor Stinner
54b2d2ec69
Issue #18408 : Fix pyexpat.ParserCreate()
...
Check if XML_ParserCreate_MM() failed (ex: MemoryError) before using
self->itself.
2013-07-15 17:15:57 +02:00
Ronald Oussoren
0fedb37c47
Issue #18393 : Remove use of deprecated API on OSX
...
The "Gestalt" function on OSX is deprecated (starting with OSX 10.8),
remove its usage from the stdlib. The patch removes a number of private
functions and a private module, but does not change the public API.
The removed code was effectively dead, the platform module has used
other code to fetch the OSX version for years and could only use
on the Gestalt-based code as a fallback. That fallback can only trigger
on broken OSX installs (that is, someone has removed parts of the system
install)
2013-07-15 18:32:09 +02:00
Richard Oudkerk
9ba6962a04
Issue #18344 : Fix potential ref-leaks in _bufferedreader_read_all().
2013-07-15 16:10:28 +01:00
Richard Oudkerk
9ad51ec81b
Issue #18344 : Fix potential ref-leaks in _bufferedreader_read_all().
2013-07-15 16:05:22 +01:00
Raymond Hettinger
90dea4ce43
Tweak the deque struct by moving the least used fields (maxlen and weakref) to the end.
2013-07-13 22:30:25 -07:00
Raymond Hettinger
840533bf1c
Use a do-while loop in the inner loop for rotate (m is always greater than zero).
2013-07-13 17:03:58 -07:00
Raymond Hettinger
3959af9b2a
Move the freeblock() call outside the main loop to speed-up and simplify the block re-use logic.
2013-07-13 02:34:08 -07:00
Victor Stinner
d917dcbe5e
Issue #18408 : Fix constructors of _elementtree.c
...
* Use Py_DECREF() instead of PyObject_GC_Del() to release correctly all
resources
* Raise MemoryError on memory allocation failure
2013-07-12 02:05:17 +02:00