Skip to content
This repository has been archived by the owner on Mar 8, 2018. It is now read-only.

Commit

Permalink
int -> Py_ssize_t
Browse files Browse the repository at this point in the history
  • Loading branch information
xwmx committed Nov 22, 2009
1 parent 72550a7 commit 0de3bbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ static yajl_gen_status ProcessObject(_YajlEncoder *self, PyObject *object)
}
if (PyString_Check(object)) {
const unsigned char *buffer;
int length;
Py_ssize_t length;
PyString_AsStringAndSize(object, (char **)&buffer, &length);

return yajl_gen_string(handle, buffer, (unsigned int)(length));
Expand Down Expand Up @@ -86,7 +86,7 @@ static yajl_gen_status ProcessObject(_YajlEncoder *self, PyObject *object)
}
if (PyDict_Check(object)) {
PyObject *key, *value;
int position = 0;
Py_ssize_t position = 0;

status = yajl_gen_map_open(handle);
while (PyDict_Next(object, &position, &key, &value)) {
Expand Down

0 comments on commit 0de3bbf

Please sign in to comment.