Serhiy Storchaka
b879fe82e7
Expand the PySlice_GetIndicesEx macro. ( #1023 )
9 years ago
Serhiy Storchaka
fff9a31a91
bpo-29865: Use PyXXX_GET_SIZE macros rather than Py_SIZE for concrete types. ( #748 )
9 years ago
Stefan Krah
195319e6bb
Issue #29111 : Fix memoryview signature.
9 years ago
Victor Stinner
de4ae3d486
Backed out changeset b9c9691c72c5
Issue #28858 : The change b9c9691c72c5 introduced a regression. It seems like
_PyObject_CallArg1() uses more stack memory than
PyObject_CallFunctionObjArgs().
9 years ago
Victor Stinner
27580c1fb5
Replace PyObject_CallFunctionObjArgs() with fastcall
* 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 .
9 years ago
Benjamin Peterson
82cce4c5ef
use static inline instead of Py_LOCAL_INLINE
9 years ago
Benjamin Peterson
a9296e7f3b
require C99 bool
9 years ago
Benjamin Peterson
af580dff4a
replace PY_LONG_LONG with long long
9 years ago
Benjamin Peterson
ed4aa83ff7
require a long long data type ( closes #27961 )
9 years ago
Serhiy Storchaka
ef1585eb9a
Issue #25923 : Added more const qualifiers to signatures of static and private functions.
10 years ago
Stefan Krah
7c3f3859a5
Fix Visual Studio warning.
10 years ago
Stefan Krah
0ce5b6e268
Iaaue #25598 : Fix memory_hex from #9951 for non-contiguous buffers.
10 years ago
Stefan Krah
0c51595a78
Issue #15944 : memoryview: Allow arbitrary formats when casting to bytes.
Original patch by Martin Panter.
11 years ago
Gregory P. Smith
8cb6569fe1
Implements issue #9951 : Adds a hex() method to bytes, bytearray, & memoryview.
Also updates a few internal implementations of the same thing to use the
new built-in code.
Contributed by Arnon Yaari.
11 years ago
Antoine Pitrou
31084ba528
Issue #23632 : Memoryviews now allow tuple indexing (including for multi-dimensional memoryviews).
11 years ago
Serhiy Storchaka
009b811d67
Removed unintentional trailing spaces in non-external and non-generated C files.
11 years ago
Stefan Krah
fa5d6a5ff3
Issue #22668 : Ensure that format strings survive slicing after casting.
11 years ago
R David Murray
861470c836
#16518 : Bring error messages in harmony with docs ("bytes-like object")
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.)
11 years ago
Stefan Krah
bcaf5999e6
Issue #20186 : memoryobject.c: add function signatures.
12 years ago
Victor Stinner
45e8e2f218
Issue #21490 : Add new C macros: Py_ABS() and Py_STRINGIFY()
Keep _Py_STRINGIZE() in PC/pyconfig.h to not introduce a dependency between
pyconfig.h and pymacros.h.
12 years ago
Christian Heimes
985ecdcfc2
ssue #19183 : Implement PEP 456 'secure and interchangeable hash algorithm'.
Python now uses SipHash24 on all major platforms.
12 years ago
Antoine Pitrou
60b183407c
Issue #19014 : memoryview.cast() is now allowed on zero-length views.
12 years ago
Nick Coghlan
a0f169cde8
Close #19078 : memoryview now supports reversed
Patch by Claudiu Popa
12 years ago
Stefan Krah
674a42b114
Fix error messages.
13 years ago
Stefan Krah
4af77a0276
Issue #15814 : Use hash function that is compatible with the equality
definition from #15573 .
13 years ago
Alexander Belopolsky
f73c69e06f
Issue #15855 : added docstrings for memoryview methods and data descriptors new in 3.3.
13 years ago
Alexander Belopolsky
397e5c98bc
Issue #15855 : added docstrings for memoryview methods and data descriptors.
13 years ago
Nick Coghlan
06e1ab0a6b
Close #15573 : use value-based memoryview comparisons (patch by Stefan Krah)
14 years ago
Stefan Krah
e4c0799d9c
Add unused parameter to a METH_NOARGS function.
14 years ago
Stefan Krah
7d12d9df13
Issue #12834 : Fix PyBuffer_ToContiguous() for non-contiguous arrays.
14 years ago
Richard Oudkerk
3e0a1eb889
Issue #14930 : Make memoryview objects weakrefable.
14 years ago
Stefan Krah
1649c1b33a
Issue #14181 : Preserve backwards compatibility for getbufferprocs that a) do
not adhere to the new documentation and b) manage to clobber view->obj before
returning failure.
14 years ago
Stefan Krah
4e99a315b7
Issue #14181 : Allow memoryview construction from an object that uses the
getbuffer redirection scheme.
14 years ago
Stefan Krah
9a2d99e28a
- Issue #10181 : New memoryview implementation fixes multiple ownership
and lifetime issues of dynamically allocated Py_buffer members (#9990 )
as well as crashes (#8305 , #7433 ). Many new features have been added
(See whatsnew/3.3), and the documentation has been updated extensively.
The ndarray test object from _testbuffer.c implements all aspects of
PEP-3118, so further development towards the complete implementation
of the PEP can proceed in a test-driven manner.
Thanks to Nick Coghlan, Antoine Pitrou and Pauli Virtanen for review
and many ideas.
- Issue #12834 : Fix incorrect results of memoryview.tobytes() for
non-contiguous arrays.
- Issue #5231 : Introduce memoryview.cast() method that allows changing
format and shape without making a copy of the underlying memory.
14 years ago
Antoine Pitrou
ce4a9da705
Issue #13411 : memoryview objects are now hashable when the underlying object is hashable.
14 years ago
Brian Curtin
dfc80e3d97
Replace Py_NotImplemented returns with the macro form Py_RETURN_NOTIMPLEMENTED.
The macro was introduced in #12724 .
15 years ago
Antoine Pitrou
915605c59a
Merged revisions 88550 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88550 | antoine.pitrou | 2011-02-24 21:50:49 +0100 (jeu., 24 févr. 2011) | 4 lines
Issue #11286 : Raise a ValueError from calling PyMemoryView_FromBuffer with
a buffer struct having a NULL data pointer.
........
15 years ago
Antoine Pitrou
5bffa79c22
Issue #11286 : Raise a ValueError from calling PyMemoryView_FromBuffer with
a buffer struct having a NULL data pointer.
15 years ago
Antoine Pitrou
3013b16b62
Merged revisions 88097 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88097 | antoine.pitrou | 2011-01-18 19:57:52 +0100 (mar., 18 janv. 2011) | 4 lines
Issue #10451 : memoryview objects could allow to mutate a readable buffer.
Initial patch by Ross Lagerwall.
........
15 years ago
Antoine Pitrou
566facd39b
Merged revisions 88097 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88097 | antoine.pitrou | 2011-01-18 19:57:52 +0100 (mar., 18 janv. 2011) | 4 lines
Issue #10451 : memoryview objects could allow to mutate a readable buffer.
Initial patch by Ross Lagerwall.
........
15 years ago
Antoine Pitrou
ad62b03949
Issue #10451 : memoryview objects could allow to mutate a readable buffer.
Initial patch by Ross Lagerwall.
15 years ago
Martin v. Löwis
4d0d471a80
Merge branches/pep-0384.
15 years ago
Antoine Pitrou
aeb6ceead7
Issue #10293 : Remove obsolete field in the PyMemoryView structure,
unused undocumented value PyBUF_SHADOW, and strangely-looking code in
PyMemoryView_GetContiguous.
15 years ago
Benjamin Peterson
83473288a8
deuglify
15 years ago
Antoine Pitrou
6e6cc830c4
Issue #9757 : memoryview objects get a release() method to release the
underlying buffer (previously this was only done when deallocating the
memoryview), and gain support for the context management protocol.
16 years ago
Antoine Pitrou
9cf85f144e
Merged revisions 84408-84409 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84408 | antoine.pitrou | 2010-09-01 23:14:16 +0200 (mer., 01 sept. 2010) | 4 lines
Issue #9737 : Fix a crash when trying to delete a slice or an item from
a memoryview object.
........
r84409 | antoine.pitrou | 2010-09-01 23:14:46 +0200 (mer., 01 sept. 2010) | 3 lines
Fix a compilation warning
........
16 years ago
Antoine Pitrou
f43f65b69f
Merged revisions 84408-84409 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84408 | antoine.pitrou | 2010-09-01 23:14:16 +0200 (mer., 01 sept. 2010) | 4 lines
Issue #9737 : Fix a crash when trying to delete a slice or an item from
a memoryview object.
........
r84409 | antoine.pitrou | 2010-09-01 23:14:46 +0200 (mer., 01 sept. 2010) | 3 lines
Fix a compilation warning
........
16 years ago
Antoine Pitrou
c73b909a2b
Fix a compilation warning
16 years ago
Antoine Pitrou
e0793ba992
Issue #9737 : Fix a crash when trying to delete a slice or an item from
a memoryview object.
16 years ago
Antoine Pitrou
1fcdba84be
Merged revisions 84391 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84391 | antoine.pitrou | 2010-09-01 14:58:21 +0200 (mer., 01 sept. 2010) | 5 lines
Issue #3101 : Helper functions _add_one_to_C() and _add_one_to_F() become
_Py_add_one_to_C() and _Py_add_one_to_F(), respectively.
........
16 years ago