@@ -149,15 +149,17 @@ extern "C"
149
149
static PyObject* iternext_handler (PyObject*);
150
150
151
151
// Sequence methods
152
- static int sequence_length_handler (PyObject*);
152
+ static Py_ssize_t sequence_length_handler (PyObject*);
153
153
static PyObject* sequence_concat_handler (PyObject*,PyObject*);
154
- static PyObject* sequence_repeat_handler (PyObject*, int );
155
- static PyObject* sequence_item_handler (PyObject*, int );
156
- static PyObject* sequence_slice_handler (PyObject*, int , int );
157
- static int sequence_ass_item_handler (PyObject*, int , PyObject*);
158
- static int sequence_ass_slice_handler (PyObject*, int , int , PyObject*);
154
+ static PyObject* sequence_repeat_handler (PyObject*, Py_ssize_t);
155
+ static PyObject* sequence_item_handler (PyObject*, Py_ssize_t);
156
+ static PyObject* sequence_slice_handler (PyObject*, Py_ssize_t,
157
+ Py_ssize_t);
158
+ static int sequence_ass_item_handler (PyObject*, Py_ssize_t, PyObject*);
159
+ static int sequence_ass_slice_handler (PyObject*, Py_ssize_t,
160
+ Py_ssize_t, PyObject*);
159
161
// Mapping
160
- static int mapping_length_handler (PyObject*);
162
+ static Py_ssize_t mapping_length_handler (PyObject*);
161
163
static PyObject* mapping_subscript_handler (PyObject*, PyObject*);
162
164
static int mapping_ass_subscript_handler (PyObject*, PyObject*, PyObject*);
163
165
@@ -186,9 +188,9 @@ extern "C"
186
188
static PyObject* number_power_handler (PyObject*, PyObject*, PyObject*);
187
189
188
190
// Buffer
189
- static int buffer_getreadbuffer_handler (PyObject*, int , void **);
190
- static int buffer_getwritebuffer_handler (PyObject*, int , void **);
191
- static int buffer_getsegcount_handler (PyObject*, int *);
191
+ static Py_ssize_t buffer_getreadbuffer_handler (PyObject*, Py_ssize_t , void **);
192
+ static Py_ssize_t buffer_getwritebuffer_handler (PyObject*, Py_ssize_t , void **);
193
+ static Py_ssize_t buffer_getsegcount_handler (PyObject*, Py_ssize_t *);
192
194
};
193
195
194
196
@@ -599,7 +601,7 @@ extern "C" PyObject* iternext_handler( PyObject *self )
599
601
600
602
601
603
// Sequence methods
602
- extern " C" int sequence_length_handler ( PyObject *self )
604
+ extern " C" Py_ssize_t sequence_length_handler ( PyObject *self )
603
605
{
604
606
try
605
607
{
@@ -625,7 +627,7 @@ extern "C" PyObject* sequence_concat_handler( PyObject *self, PyObject *other )
625
627
}
626
628
}
627
629
628
- extern " C" PyObject* sequence_repeat_handler ( PyObject *self, int count )
630
+ extern " C" PyObject* sequence_repeat_handler ( PyObject *self, Py_ssize_t count )
629
631
{
630
632
try
631
633
{
@@ -638,7 +640,7 @@ extern "C" PyObject* sequence_repeat_handler( PyObject *self, int count )
638
640
}
639
641
}
640
642
641
- extern " C" PyObject* sequence_item_handler ( PyObject *self, int index )
643
+ extern " C" PyObject* sequence_item_handler ( PyObject *self, Py_ssize_t index )
642
644
{
643
645
try
644
646
{
@@ -651,7 +653,8 @@ extern "C" PyObject* sequence_item_handler( PyObject *self, int index )
651
653
}
652
654
}
653
655
654
- extern " C" PyObject* sequence_slice_handler ( PyObject *self, int first, int last )
656
+ extern " C" PyObject* sequence_slice_handler ( PyObject *self, Py_ssize_t first,
657
+ Py_ssize_t last )
655
658
{
656
659
try
657
660
{
@@ -664,7 +667,7 @@ extern "C" PyObject* sequence_slice_handler( PyObject *self, int first, int last
664
667
}
665
668
}
666
669
667
- extern " C" int sequence_ass_item_handler ( PyObject *self, int index, PyObject *value )
670
+ extern " C" int sequence_ass_item_handler ( PyObject *self, Py_ssize_t index, PyObject *value )
668
671
{
669
672
try
670
673
{
@@ -677,7 +680,7 @@ extern "C" int sequence_ass_item_handler( PyObject *self, int index, PyObject *v
677
680
}
678
681
}
679
682
680
- extern " C" int sequence_ass_slice_handler ( PyObject *self, int first, int last, PyObject *value )
683
+ extern " C" int sequence_ass_slice_handler ( PyObject *self, Py_ssize_t first, Py_ssize_t last, PyObject *value )
681
684
{
682
685
try
683
686
{
@@ -691,7 +694,7 @@ extern "C" int sequence_ass_slice_handler( PyObject *self, int first, int last,
691
694
}
692
695
693
696
// Mapping
694
- extern " C" int mapping_length_handler ( PyObject *self )
697
+ extern " C" Py_ssize_t mapping_length_handler ( PyObject *self )
695
698
{
696
699
try
697
700
{
@@ -1018,7 +1021,7 @@ extern "C" PyObject* number_power_handler( PyObject *self, PyObject *x1, PyObjec
1018
1021
}
1019
1022
1020
1023
// Buffer
1021
- extern " C" int buffer_getreadbuffer_handler ( PyObject *self, int index, void **pp )
1024
+ extern " C" Py_ssize_t buffer_getreadbuffer_handler ( PyObject *self, Py_ssize_t index, void **pp )
1022
1025
{
1023
1026
try
1024
1027
{
@@ -1031,7 +1034,7 @@ extern "C" int buffer_getreadbuffer_handler( PyObject *self, int index, void **p
1031
1034
}
1032
1035
}
1033
1036
1034
- extern " C" int buffer_getwritebuffer_handler ( PyObject *self, int index, void **pp )
1037
+ extern " C" Py_ssize_t buffer_getwritebuffer_handler ( PyObject *self, Py_ssize_t index, void **pp )
1035
1038
{
1036
1039
try
1037
1040
{
@@ -1044,7 +1047,7 @@ extern "C" int buffer_getwritebuffer_handler( PyObject *self, int index, void **
1044
1047
}
1045
1048
}
1046
1049
1047
- extern " C" int buffer_getsegcount_handler ( PyObject *self, int *count )
1050
+ extern " C" Py_ssize_t buffer_getsegcount_handler ( PyObject *self, Py_ssize_t *count )
1048
1051
{
1049
1052
try
1050
1053
{
@@ -1212,13 +1215,13 @@ Py::Object PythonExtensionBase::number_power( const Py::Object &, const Py::Obje
1212
1215
1213
1216
1214
1217
// Buffer
1215
- int PythonExtensionBase::buffer_getreadbuffer ( int , void ** )
1218
+ Py_ssize_t PythonExtensionBase::buffer_getreadbuffer ( Py_ssize_t , void ** )
1216
1219
{ missing_method ( buffer_getreadbuffer ); return -1 ; }
1217
1220
1218
- int PythonExtensionBase::buffer_getwritebuffer ( int , void ** )
1221
+ Py_ssize_t PythonExtensionBase::buffer_getwritebuffer ( Py_ssize_t , void ** )
1219
1222
{ missing_method ( buffer_getwritebuffer ); return -1 ; }
1220
1223
1221
- int PythonExtensionBase::buffer_getsegcount ( int * )
1224
+ Py_ssize_t PythonExtensionBase::buffer_getsegcount ( Py_ssize_t * )
1222
1225
{ missing_method ( buffer_getsegcount ); return -1 ; }
1223
1226
1224
1227
// --------------------------------------------------------------------------------
0 commit comments