diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index e53f0b5eba4..0445b38c345 100644 --- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c @@ -377,7 +377,7 @@ void _set_result(sqlite3_context* context, PyObject* py_val) { long longval; const char* buffer; - int buflen; + Py_ssize_t buflen; PyObject* stringval; if (PyErr_Occurred()) { @@ -416,7 +416,7 @@ PyObject* _build_py_params(sqlite3_context *context, int argc, sqlite3_value** a PyObject* cur_py_value; const char* val_str; PY_LONG_LONG val_int; - int buflen; + Py_ssize_t buflen; void* raw_buffer; args = PyTuple_New(argc); diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c index 2a8dda4686d..fe6cff9aaa8 100644 --- a/Modules/_sqlite/cursor.c +++ b/Modules/_sqlite/cursor.c @@ -239,7 +239,7 @@ PyObject* _fetch_one_row(Cursor* self) PY_LONG_LONG intval; PyObject* converter; PyObject* converted; - int nbytes; + Py_ssize_t nbytes; PyObject* buffer; void* raw_buffer; const char* val_str; diff --git a/Modules/_sqlite/row.c b/Modules/_sqlite/row.c index 97b538d9385..61de8017367 100644 --- a/Modules/_sqlite/row.c +++ b/Modules/_sqlite/row.c @@ -126,7 +126,7 @@ PyObject* row_subscript(Row* self, PyObject* idx) } } -int row_length(Row* self, PyObject* args, PyObject* kwargs) +Py_ssize_t row_length(Row* self, PyObject* args, PyObject* kwargs) { return PyTuple_GET_SIZE(self->data); } @@ -138,7 +138,7 @@ static int row_print(Row* self, FILE *fp, int flags) PyMappingMethods row_as_mapping = { - /* mp_length */ (inquiry)row_length, + /* mp_length */ (lenfunc)row_length, /* mp_subscript */ (binaryfunc)row_subscript, /* mp_ass_subscript */ (objobjargproc)0, }; diff --git a/Modules/_sqlite/statement.c b/Modules/_sqlite/statement.c index 91ec1bb6d49..4a957d6f4f1 100644 --- a/Modules/_sqlite/statement.c +++ b/Modules/_sqlite/statement.c @@ -94,7 +94,7 @@ int statement_bind_parameter(Statement* self, int pos, PyObject* parameter) #endif const char* buffer; char* string; - int buflen; + Py_ssize_t buflen; PyObject* stringval; if (parameter == Py_None) {