Mercurial > cpython-lru_cache-weakref
diff Modules/_sqlite/statement.c @ 87236:2a01ca4b0edc
sqlite: Use Py_ssize_t to store a size instead of an int
Fix a compiler warning on Windows 64-bit
| author | Victor Stinner <victor.stinner@gmail.com> |
|---|---|
| date | Mon, 18 Nov 2013 02:07:29 +0100 |
| parents | 40d25b2b93f0 |
| children |
line wrap: on
line diff
--- a/Modules/_sqlite/statement.c Mon Nov 18 02:05:31 2013 +0100 +++ b/Modules/_sqlite/statement.c Mon Nov 18 02:07:29 2013 +0100 @@ -184,7 +184,7 @@ 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 @@ 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; }
