]> granicus.if.org Git - python/commitdiff
Make ssize_t clean
authorNeal Norwitz <nnorwitz@gmail.com>
Sat, 1 Apr 2006 09:08:06 +0000 (09:08 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sat, 1 Apr 2006 09:08:06 +0000 (09:08 +0000)
Modules/_sqlite/connection.c
Modules/_sqlite/cursor.c
Modules/_sqlite/row.c
Modules/_sqlite/statement.c

index e53f0b5eba4d730b933d8aac60f9dcee313f1a7c..0445b38c345fdf4b41e8dbfebc2813f1098dc14b 100644 (file)
@@ -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);
index 2a8dda4686d19be96dae756a5098e31c76c9522d..fe6cff9aaa826ef94ceb8c947c3427fc997b9689 100644 (file)
@@ -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;
index 97b538d9385b3aab76fc98f788ba7ce2827ca925..61de801736745fbd01173de84e638e54e7a2faf2 100644 (file)
@@ -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,
 };
index 91ec1bb6d495f8c10c9695593b0e2a23f70215e2..4a957d6f4f1e6d3e6aa61a96b7efaf3a8644ef97 100644 (file)
@@ -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) {