File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -329,7 +329,8 @@ gethandle(PyObject* obj, char* name)
329329static PyObject *
330330getenvironment (PyObject * environment )
331331{
332- int i , envsize ;
332+ int i ;
333+ Py_ssize_t envsize ;
333334 PyObject * out = NULL ;
334335 PyObject * keys ;
335336 PyObject * values ;
@@ -356,7 +357,7 @@ getenvironment(PyObject* environment)
356357 p = PyUnicode_AS_UNICODE (out );
357358
358359 for (i = 0 ; i < envsize ; i ++ ) {
359- int ksize , vsize , totalsize ;
360+ Py_ssize_t ksize , vsize , totalsize ;
360361 PyObject * key = PyList_GET_ITEM (keys , i );
361362 PyObject * value = PyList_GET_ITEM (values , i );
362363
@@ -370,7 +371,7 @@ getenvironment(PyObject* environment)
370371 totalsize = (p - PyUnicode_AS_UNICODE (out )) + ksize + 1 +
371372 vsize + 1 + 1 ;
372373 if (totalsize > PyUnicode_GET_SIZE (out )) {
373- int offset = p - PyUnicode_AS_UNICODE (out );
374+ Py_ssize_t offset = p - PyUnicode_AS_UNICODE (out );
374375 PyUnicode_Resize (& out , totalsize + 1024 );
375376 p = PyUnicode_AS_UNICODE (out ) + offset ;
376377 }
You can’t perform that action at this time.
0 commit comments