summaryrefslogtreecommitdiffstats
path: root/Modules/_sqlite
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-11-18 01:07:29 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-11-18 01:07:29 (GMT)
commitafccb0a8210a6af47336915912d0ff04c276223b (patch)
tree90dde95b7078ea678b3f18acc9745b692d18376c /Modules/_sqlite
parentcb29ec5f74506add92cc8103b31c0abb1d99afcb (diff)
downloadcpython-afccb0a8210a6af47336915912d0ff04c276223b.zip
cpython-afccb0a8210a6af47336915912d0ff04c276223b.tar.gz
cpython-afccb0a8210a6af47336915912d0ff04c276223b.tar.bz2
sqlite: Use Py_ssize_t to store a size instead of an int
Fix a compiler warning on Windows 64-bit
Diffstat (limited to 'Modules/_sqlite')
-rw-r--r--Modules/_sqlite/statement.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/_sqlite/statement.c b/Modules/_sqlite/statement.c
index 6cc0e16..66b4a52 100644
--- a/Modules/_sqlite/statement.c
+++ b/Modules/_sqlite/statement.c
@@ -184,7 +184,7 @@ void pysqlite_statement_bind_parameters(pysqlite_Statement* self, PyObject* para
int i;
int rc;
int num_params_needed;
- int num_params;
+ Py_ssize_t num_params;
Py_BEGIN_ALLOW_THREADS
num_params_needed = sqlite3_bind_parameter_count(self->st);
@@ -200,7 +200,9 @@ void pysqlite_statement_bind_parameters(pysqlite_Statement* self, PyObject* para
num_params = PySequence_Size(parameters);
}
if (num_params != num_params_needed) {
- PyErr_Format(pysqlite_ProgrammingError, "Incorrect number of bindings supplied. The current statement uses %d, and there are %d supplied.",
+ PyErr_Format(pysqlite_ProgrammingError,
+ "Incorrect number of bindings supplied. The current "
+ "statement uses %d, and there are %zd supplied.",
num_params_needed, num_params);
return;
}