Skip to content

Commit 4afdf8c

Browse files
author
neal.norwitz
committed
Make ssize_t clean
git-svn-id: http://svn.python.org/projects/python/trunk@43539 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent f099acc commit 4afdf8c

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Modules/_sqlite/connection.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ void _set_result(sqlite3_context* context, PyObject* py_val)
377377
{
378378
long longval;
379379
const char* buffer;
380-
int buflen;
380+
Py_ssize_t buflen;
381381
PyObject* stringval;
382382

383383
if (PyErr_Occurred()) {
@@ -416,7 +416,7 @@ PyObject* _build_py_params(sqlite3_context *context, int argc, sqlite3_value** a
416416
PyObject* cur_py_value;
417417
const char* val_str;
418418
PY_LONG_LONG val_int;
419-
int buflen;
419+
Py_ssize_t buflen;
420420
void* raw_buffer;
421421

422422
args = PyTuple_New(argc);

Modules/_sqlite/cursor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ PyObject* _fetch_one_row(Cursor* self)
239239
PY_LONG_LONG intval;
240240
PyObject* converter;
241241
PyObject* converted;
242-
int nbytes;
242+
Py_ssize_t nbytes;
243243
PyObject* buffer;
244244
void* raw_buffer;
245245
const char* val_str;

Modules/_sqlite/row.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ PyObject* row_subscript(Row* self, PyObject* idx)
126126
}
127127
}
128128

129-
int row_length(Row* self, PyObject* args, PyObject* kwargs)
129+
Py_ssize_t row_length(Row* self, PyObject* args, PyObject* kwargs)
130130
{
131131
return PyTuple_GET_SIZE(self->data);
132132
}
@@ -138,7 +138,7 @@ static int row_print(Row* self, FILE *fp, int flags)
138138

139139

140140
PyMappingMethods row_as_mapping = {
141-
/* mp_length */ (inquiry)row_length,
141+
/* mp_length */ (lenfunc)row_length,
142142
/* mp_subscript */ (binaryfunc)row_subscript,
143143
/* mp_ass_subscript */ (objobjargproc)0,
144144
};

Modules/_sqlite/statement.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ int statement_bind_parameter(Statement* self, int pos, PyObject* parameter)
9494
#endif
9595
const char* buffer;
9696
char* string;
97-
int buflen;
97+
Py_ssize_t buflen;
9898
PyObject* stringval;
9999

100100
if (parameter == Py_None) {

0 commit comments

Comments
 (0)