Xiang Zhang
05469fa1c0
bpo-30281: Fix the default value for stop in PySlice_Unpack() ( #1531 ) ( #1480 )
2017-05-10 19:20:28 +08:00
Victor Stinner
f6a3133972
bpo-30255: Clip step in _PySlice_Unpack() ( #1429 )
...
In PySlice_IndicesEx, clip the step to [-PY_SSIZE_T_MAX,
PY_SSIZE_T_MAX] rather than [PY_SSIZE_T_MIN, PY_SSIZE_T_MAX].
(cherry picked from commit e6fc7401a9 )
2017-05-03 16:00:12 +02:00
Serhiy Storchaka
5e79321742
bpo-30074: Fix compile warnings of _PySlice_Unpack and convert missed ( #1154 )
...
PySlice_GetIndicesEx in _ctypes.c.
2017-04-15 20:11:12 +03:00
Serhiy Storchaka
e41390aca5
bpo-27867: Expand the PySlice_GetIndicesEx macro. ( #1023 ) ( #1046 )
...
(cherry picked from commit b879fe8 )
2017-04-08 11:48:57 +03:00
Serhiy Storchaka
3efe32ed48
Issue #27867 : Replaced function PySlice_GetIndicesEx() with a macro.
2017-01-25 13:22:06 +02:00
Benjamin Peterson
414f8b937f
add gc support to slice ( closes #26659 )
2016-04-16 14:47:12 -07:00
Chris Jerdonek
ad4b000179
Issue #14783 : Backport changes from 3.2.
2012-10-07 20:37:54 -07:00
Antoine Pitrou
c83ea137d7
Untabify C files. Will watch buildbots.
2010-05-09 14:46:46 +00:00
Benjamin Peterson
01c6e6fb35
many more types to initialize (I had to expose some of them)
2009-04-18 22:15:26 +00:00
Mark Dickinson
1ec2fcd16e
Issue #3004 : Minor fix to slice.indices(). slice(-10).indices(9) now
...
returns (0, 0, 1) instead of (0, -1, 1), and slice(None, 10, -1).indices(10)
returns (9, 9, -1) instead of (9, 10, -1).
2008-06-20 14:53:43 +00:00
Gregory P. Smith
dd96db63f6
This reverts r63675 based on the discussion in this thread:
...
http://mail.python.org/pipermail/python-dev/2008-June/079988.html
Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names
in the spirit of 3.0 are available via a #define only. See the email thread.
2008-06-09 04:58:54 +00:00
Christian Heimes
593daf545b
Renamed PyString to PyBytes
2008-05-26 12:51:38 +00:00
Christian Heimes
e93237dfcc
#1629 : Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available.
2007-12-19 02:37:44 +00:00
Martin v. Löwis
6819210b9e
PEP 3123: Provide forward compatibility with Python 3.0, while keeping
...
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
2007-07-21 06:55:02 +00:00
Raymond Hettinger
13936697f6
SF 1191699: Make slices picklable
2007-04-11 18:40:58 +00:00
Neal Norwitz
8a87f5d37e
Patch #1538606 , Patch to fix __index__() clipping.
...
I modified this patch some by fixing style, some error checking, and adding
XXX comments. This patch requires review and some changes are to be expected.
I'm checking in now to get the greatest possible review and establish a
baseline for moving forward. I don't want this to hold up release if possible.
2006-08-12 17:03:09 +00:00
Martin v. Löwis
54b42f185e
Allow long integers in PySlice_GetIndices.
2006-04-03 11:38:08 +00:00
Neal Norwitz
d08eaf4d1b
Use Py_ssize_t in slices
2006-04-03 04:46:04 +00:00
Georg Brandl
347b30042b
Remove unnecessary casts in type object initializers.
2006-03-30 11:57:00 +00:00
Neal Norwitz
badc086543
Stop duplicating code and handle slice indices consistently and correctly
...
wrt to ssize_t.
2006-03-23 06:03:08 +00:00
Martin v. Löwis
18e165558b
Merge ssize_t branch.
2006-02-15 17:27:45 +00:00
Georg Brandl
02c42871cf
Disallow keyword arguments for type constructors that don't use them.
...
(fixes bug #1119418 )
2005-08-26 06:42:30 +00:00
Raymond Hettinger
b859c070ef
SF bug #800796 : Difference between hash() and __hash__()
...
slice(5).__hash__() now raises a TypeError.
2003-09-05 14:27:30 +00:00
Raymond Hettinger
ea3fdf44a2
SF patch #659536 : Use PyArg_UnpackTuple where possible.
...
Obtain cleaner coding and a system wide
performance boost by using the fast, pre-parsed
PyArg_Unpack function instead of PyArg_ParseTuple
function which is driven by a format string.
2002-12-29 16:33:45 +00:00
Michael W. Hudson
cbd6fb9006
Handle really big steps in extended slices.
...
Fixes a test failure on 64 bit platforms (I hope).
2002-11-06 15:17:32 +00:00