summaryrefslogtreecommitdiffstats
path: root/Objects/abstract.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #23571: Enhance _Py_CheckFunctionResult()Victor Stinner2015-03-241-9/+10
| | | | | | | | | Too bad, sometimes Py_FatalError() is unable to write the exception into sys.stderr (on "AMD64 OpenIndiana 3.x" buildbot, the buildbot was probably out of memory). Call Py_FatalError() with a different message for the two cases (result+error, or no result and no error).
* Issue #23571: In debug mode, _Py_CheckFunctionResult() now callsVictor Stinner2015-03-241-12/+9
| | | | | | Py_FatalError() instead of using an assertion in debug mode. Py_FatalError() displays the current exception and the traceback which contain more information than just the assertion error.
* Issue #23571: _Py_CheckFunctionResult() now gives the name of the functionVictor Stinner2015-03-211-6/+20
| | | | | | | | | | | which returned an invalid result (result+error or no result without error) in the exception message. Add also unit test to check that the exception contains the name of the function. Special case: the final _PyEval_EvalFrameEx() check doesn't mention the function since it didn't execute a single function but a whole frame.
* Issue #23571: Oops, fix #ifdef assert()Victor Stinner2015-03-091-1/+1
| | | | assert() are noop when NDEBUG is defined. We want the opposite.
* Issue #23571: PyObject_Call(), PyCFunction_Call() and call_function() nowVictor Stinner2015-03-061-20/+53
| | | | | | | | | | | raise a SystemError if a function returns a result and raises an exception. The SystemError is chained to the previous exception. Refactor also PyObject_Call() and PyCFunction_Call() to make them more readable. Remove some checks which became useless (duplicate checks). Change reviewed by Serhiy Storchaka.
* Issue #14203: Remove obsolete support for view==NULL in PyBuffer_FillInfo()Stefan Krah2015-02-031-1/+6
| | | | | and bytearray_getbuffer(). Both functions now raise BufferError in that case.
* Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()Serhiy Storchaka2015-02-021-53/+27
|\ | | | | | | and PyObject_AsWriteBuffer().
| * Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()Serhiy Storchaka2015-02-021-54/+27
| | | | | | | | and PyObject_AsWriteBuffer().
* | Merge from 3.4.Stefan Krah2015-02-011-2/+2
|\ \ | |/
| * Issue #23370: Fix off-by-one error for non-contiguous buffers.Stefan Krah2015-02-011-2/+2
| |
* | Issue #22445: PyBuffer_IsContiguous() now implements precise contiguityStefan Krah2015-02-011-12/+37
| | | | | | | | | | tests, compatible with NumPy's NPY_RELAXED_STRIDES_CHECKING compilation flag. Previously the function reported false negatives for corner cases.
* | Issue20284: Implement PEP461Ethan Furman2015-01-241-2/+3
| |
* | #16518: Bring error messages in harmony with docs ("bytes-like object")R David Murray2014-10-051-7/+6
| | | | | | | | | | | | | | | | | | | | Some time ago we changed the docs to consistently use the term 'bytes-like object' in all the contexts where bytes, bytearray, memoryview, etc are used. This patch (by Ezio Melotti) completes that work by changing the error messages that previously reported that certain types did "not support the buffer interface" to instead say that a bytes-like object is required. (The glossary entry for bytes-like object references the discussion of the buffer protocol in the docs.)
* | Closes #22540: speed up PyObject_IsInstance and PyObject_IsSubclass in the ↵Georg Brandl2014-10-031-0/+15
| | | | | | | | common case that the second argument has metaclass "type".
* | Issue #22290: PyObject_Call() now fails with an assertion error when calledVictor Stinner2014-09-041-0/+5
| | | | | | | | | | with an exception set. This new assertion helps to understand if the exception was already set before calling the function or raised by the function.
* | merge 3.4Benjamin Peterson2014-06-271-9/+6
|\ \ | |/
| * use NULL not 0Benjamin Peterson2014-06-271-9/+6
| |
* | PEP 465: a dedicated infix operator for matrix multiplication (closes #21176)Benjamin Peterson2014-04-101-0/+14
|/
* Better assertion in PyObject_Call() to detect functions returning a result withVictor Stinner2013-12-191-1/+2
| | | | an exception set (invalid state).
* Issue #17576: Deprecation warning emitted now when __int__() or __index__()Serhiy Storchaka2013-12-111-56/+36
|\ | | | | | | | | return not int instance. Introduced _PyLong_FromNbInt() and refactored PyLong_As*() functions.
| * Issue #17576: Deprecation warning emitted now when __int__() or __index__()Serhiy Storchaka2013-12-111-56/+36
| | | | | | | | | | return not int instance. Introduced _PyLong_FromNbInt() and refactored PyLong_As*() functions.
* | Issue #19437: Fix PyObject_CallFunction(), handle Py_VaBuildValue() andVictor Stinner2013-10-291-0/+2
| | | | | | | | PyTuple_New() failure
* | Issue #19369: Optimized the usage of __length_hint__().Serhiy Storchaka2013-10-241-8/+10
| |
* | Issue #1772673: The type of `char*` arguments now changed to `const char*`.Serhiy Storchaka2013-10-191-4/+4
| |
* | Issue #18783: Removed existing mentions of Python long type in docstrings,Serhiy Storchaka2013-08-271-4/+3
|\ \ | |/ | | | | error messages and comments.
| * Issue #18783: Removed existing mentions of Python long type in docstrings,Serhiy Storchaka2013-08-271-4/+3
| | | | | | | | error messages and comments.
* | Issue #16741: Fix an error reporting in int().Serhiy Storchaka2013-08-031-24/+5
|\ \ | |/
| * Issue #16741: Fix an error reporting in int().Serhiy Storchaka2013-08-031-24/+5
| |
* | Issue #18408: add more assertions on PyErr_Occurred() in ceval.c to detect bugsVictor Stinner2013-07-151-2/+1
| | | | | | | | earlier
* | Issue #18408: PyObject_Call() now fails with an assertion error in debug modeVictor Stinner2013-07-151-1/+7
| | | | | | | | | | if the function called failed whereas no exception was raised, to detect bugs earlier.
* | Issue #18203: Replace malloc() with PyMem_Malloc() in ↵Victor Stinner2013-07-071-8/+11
| | | | | | | | _PySequence_BytesToCharpArray()
* | Issue #9369: The types of `char*` arguments of PyObject_CallFunction() andSerhiy Storchaka2013-05-291-7/+10
| | | | | | | | | | PyObject_CallMethod() now changed to `const char*`. Based on patches by Jörg Müller and Lars Buitinck.
* | Closes #17892: Fix the name of _PyObject_CallMethodObjIdArgsAlexandre Vassalotti2013-05-021-1/+1
| |
* | Issue #17715: Merge fix from 3.3.Mark Dickinson2013-04-131-0/+2
|\ \ | |/
| * Issue #17715: Add missing NULL Check to PyNumber_Long.Mark Dickinson2013-04-131-0/+2
| |
* | Revert a premature patch for issue #14010 (changeset 846bd418aee5).Serhiy Storchaka2013-04-061-5/+2
|\ \ | |/
| * Revert a premature patch for issue #14010 (changeset aaaf36026511).Serhiy Storchaka2013-04-061-5/+2
| |
* | Issue #14010: Fix a crash when iterating or deleting deeply nested filtersSerhiy Storchaka2013-04-061-2/+5
|\ \ | |/ | | | | (builting and in itertools module, i.e. map(), itertools.chain(), etc).
| * Issue #14010: Fix a crash when iterating or deleting deeply nested filtersSerhiy Storchaka2013-04-061-2/+5
| | | | | | | | (builting and in itertools module, i.e. map(), itertools.chain(), etc).
* | Issue #16148: Small improvements and cleanup. Added version informationArmin Ronacher2012-10-071-7/+8
| | | | | | | | to docs.
* | and another oneChristian Heimes2012-10-061-2/+2
| |
* | move var declaration to top of block to fix compilation on Windows, fixes ↵Christian Heimes2012-10-061-2/+4
| | | | | | | | a7ec0a1b0f7c
* | Issue #16148: implemented PEP 424Armin Ronacher2012-10-061-29/+47
|/
* Issue #16060: Fix a double DECREF in int() implementation. Thanks Serhiy ↵Mark Dickinson2012-09-271-4/+3
| | | | Storchaka.
* Merge 3.2.Stefan Krah2012-08-211-0/+7
|\
| * Issue #15736: Fix overflow in _PySequence_BytesToCharpArray().Stefan Krah2012-08-211-0/+7
| |
* | Merge 3.2.Stefan Krah2012-08-201-0/+5
|\ \ | |/
| * Issue #15732: Fix (constructed) crash in _PySequence_BytesToCharpArray().Stefan Krah2012-08-201-0/+5
| | | | | | | | Found by Coverity.
* | Issue #12834: Fix PyBuffer_ToContiguous() for non-contiguous arrays.Stefan Krah2012-07-281-56/+0
| |
* | Issue #2377: Make importlib the implementation of __import__().Brett Cannon2012-04-141-0/+29
| | | | | | | | | | | | | | importlib._bootstrap is now frozen into Python/importlib.h and stored as _frozen_importlib in sys.modules. Py_Initialize() loads the frozen code along with sys and imp and then uses _frozen_importlib._install() to set builtins.__import__() w/ _frozen_importlib.__import__().