@@ -1629,7 +1629,7 @@ static PyObject*pattern_scanner(PatternObject*, PyObject*);
16291629static PyObject *
16301630sre_codesize (PyObject * self , PyObject * unused )
16311631{
1632- return Py_BuildValue ( "l" , sizeof (SRE_CODE ));
1632+ return PyLong_FromSize_t ( sizeof (SRE_CODE ));
16331633}
16341634
16351635static PyObject *
@@ -2467,7 +2467,7 @@ pattern_subx(PatternObject* self, PyObject* ptemplate, PyObject* string,
24672467 return NULL ;
24682468
24692469 if (subn )
2470- return Py_BuildValue ("Ni " , item , n );
2470+ return Py_BuildValue ("Nn " , item , n );
24712471
24722472 return item ;
24732473
@@ -3423,7 +3423,7 @@ match_start(MatchObject* self, PyObject* args)
34233423 }
34243424
34253425 /* mark is -1 if group is undefined */
3426- return Py_BuildValue ( "i" , self -> mark [index * 2 ]);
3426+ return PyLong_FromSsize_t ( self -> mark [index * 2 ]);
34273427}
34283428
34293429static PyObject *
@@ -3446,7 +3446,7 @@ match_end(MatchObject* self, PyObject* args)
34463446 }
34473447
34483448 /* mark is -1 if group is undefined */
3449- return Py_BuildValue ( "i" , self -> mark [index * 2 + 1 ]);
3449+ return PyLong_FromSsize_t ( self -> mark [index * 2 + 1 ]);
34503450}
34513451
34523452LOCAL (PyObject * )
@@ -3596,7 +3596,7 @@ static PyObject *
35963596match_lastindex_get (MatchObject * self )
35973597{
35983598 if (self -> lastindex >= 0 )
3599- return Py_BuildValue ( "i" , self -> lastindex );
3599+ return PyLong_FromSsize_t ( self -> lastindex );
36003600 Py_INCREF (Py_None );
36013601 return Py_None ;
36023602}
0 commit comments