summaryrefslogtreecommitdiffstats
path: root/Modules/_sqlite
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_sqlite')
-rw-r--r--Modules/_sqlite/cache.c2
-rw-r--r--Modules/_sqlite/connection.c6
-rw-r--r--Modules/_sqlite/row.c8
-rw-r--r--Modules/_sqlite/statement.c2
4 files changed, 9 insertions, 9 deletions
diff --git a/Modules/_sqlite/cache.c b/Modules/_sqlite/cache.c
index 62c5893..72b1f2c 100644
--- a/Modules/_sqlite/cache.c
+++ b/Modules/_sqlite/cache.c
@@ -162,7 +162,7 @@ PyObject* pysqlite_cache_get(pysqlite_Cache* self, PyObject* args)
* entry in the cache, and make space if necessary by throwing the
* least used item out of the cache. */
- if (PyDict_Size(self->mapping) == self->size) {
+ if (PyDict_GET_SIZE(self->mapping) == self->size) {
if (self->last) {
node = self->last;
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index 1c6aa54..7bbc15c 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -645,7 +645,7 @@ static void _pysqlite_step_callback(sqlite3_context *context, int argc, sqlite3_
aggregate_instance = (PyObject**)sqlite3_aggregate_context(context, sizeof(PyObject*));
if (*aggregate_instance == 0) {
- *aggregate_instance = PyObject_CallFunction(aggregate_class, NULL);
+ *aggregate_instance = _PyObject_CallNoArg(aggregate_class);
if (PyErr_Occurred()) {
*aggregate_instance = 0;
@@ -933,7 +933,7 @@ static int _progress_handler(void* user_arg)
gilstate = PyGILState_Ensure();
#endif
- ret = PyObject_CallFunction((PyObject*)user_arg, NULL);
+ ret = _PyObject_CallNoArg((PyObject*)user_arg);
if (!ret) {
if (_enable_callback_tracebacks) {
@@ -1489,7 +1489,7 @@ pysqlite_connection_create_collation(pysqlite_Connection* self, PyObject* args)
PyObject* retval;
Py_ssize_t i, len;
_Py_IDENTIFIER(upper);
- char *uppercase_name_str;
+ const char *uppercase_name_str;
int rc;
unsigned int kind;
void *data;
diff --git a/Modules/_sqlite/row.c b/Modules/_sqlite/row.c
index 53342f3..c6c3e98 100644
--- a/Modules/_sqlite/row.c
+++ b/Modules/_sqlite/row.c
@@ -79,12 +79,12 @@ PyObject* pysqlite_row_item(pysqlite_Row* self, Py_ssize_t idx)
PyObject* pysqlite_row_subscript(pysqlite_Row* self, PyObject* idx)
{
Py_ssize_t _idx;
- char* key;
+ const char *key;
Py_ssize_t nitems, i;
- char* compare_key;
+ const char *compare_key;
- char* p1;
- char* p2;
+ const char *p1;
+ const char *p2;
PyObject* item;
diff --git a/Modules/_sqlite/statement.c b/Modules/_sqlite/statement.c
index 0df661b..8b45a03 100644
--- a/Modules/_sqlite/statement.c
+++ b/Modules/_sqlite/statement.c
@@ -112,7 +112,7 @@ int pysqlite_statement_create(pysqlite_Statement* self, pysqlite_Connection* con
int pysqlite_statement_bind_parameter(pysqlite_Statement* self, int pos, PyObject* parameter)
{
int rc = SQLITE_OK;
- char* string;
+ const char *string;
Py_ssize_t buflen;
parameter_type paramtype;