summaryrefslogtreecommitdiffstats
path: root/Modules/_sqlite
diff options
context:
space:
mode:
authorJeroen Demeyer <J.Demeyer@UGent.be>2019-07-08 08:19:25 (GMT)
committerInada Naoki <songofacandy@gmail.com>2019-07-08 08:19:25 (GMT)
commit762f93ff2efd6b7ef0177cad57939c0ab2002eac (patch)
tree4811b08fa9342c3b2575de7e7c1030d1d5eea8a0 /Modules/_sqlite
parent38f44b4a4adc37e8f5f8971917d8b3145f351a56 (diff)
downloadcpython-762f93ff2efd6b7ef0177cad57939c0ab2002eac.zip
cpython-762f93ff2efd6b7ef0177cad57939c0ab2002eac.tar.gz
cpython-762f93ff2efd6b7ef0177cad57939c0ab2002eac.tar.bz2
bpo-37337: Add _PyObject_CallMethodNoArgs() (GH-14267)
Diffstat (limited to 'Modules/_sqlite')
-rw-r--r--Modules/_sqlite/connection.c8
-rw-r--r--Modules/_sqlite/cursor.c2
-rw-r--r--Modules/_sqlite/module.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index 08604b9..30a9b88 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -713,7 +713,7 @@ void _pysqlite_final_callback(sqlite3_context* context)
PyErr_Fetch(&exception, &value, &tb);
restore = 1;
- function_result = _PyObject_CallMethodId(*aggregate_instance, &PyId_finalize, NULL);
+ function_result = _PyObject_CallMethodIdNoArgs(*aggregate_instance, &PyId_finalize);
Py_DECREF(*aggregate_instance);
@@ -1275,7 +1275,7 @@ PyObject* pysqlite_connection_execute(pysqlite_Connection* self, PyObject* args)
PyObject* result = 0;
PyObject* method = 0;
- cursor = _PyObject_CallMethodId((PyObject*)self, &PyId_cursor, NULL);
+ cursor = _PyObject_CallMethodIdNoArgs((PyObject*)self, &PyId_cursor);
if (!cursor) {
goto error;
}
@@ -1304,7 +1304,7 @@ PyObject* pysqlite_connection_executemany(pysqlite_Connection* self, PyObject* a
PyObject* result = 0;
PyObject* method = 0;
- cursor = _PyObject_CallMethodId((PyObject*)self, &PyId_cursor, NULL);
+ cursor = _PyObject_CallMethodIdNoArgs((PyObject*)self, &PyId_cursor);
if (!cursor) {
goto error;
}
@@ -1333,7 +1333,7 @@ PyObject* pysqlite_connection_executescript(pysqlite_Connection* self, PyObject*
PyObject* result = 0;
PyObject* method = 0;
- cursor = _PyObject_CallMethodId((PyObject*)self, &PyId_cursor, NULL);
+ cursor = _PyObject_CallMethodIdNoArgs((PyObject*)self, &PyId_cursor);
if (!cursor) {
goto error;
}
diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c
index e6fcac8..6d9685b 100644
--- a/Modules/_sqlite/cursor.c
+++ b/Modules/_sqlite/cursor.c
@@ -106,7 +106,7 @@ _pysqlite_get_converter(const char *keystr, Py_ssize_t keylen)
if (!key) {
return NULL;
}
- upcase_key = _PyObject_CallMethodId(key, &PyId_upper, NULL);
+ upcase_key = _PyObject_CallMethodIdNoArgs(key, &PyId_upper);
Py_DECREF(key);
if (!upcase_key) {
return NULL;
diff --git a/Modules/_sqlite/module.c b/Modules/_sqlite/module.c
index 9fe0dc9..d5c353e 100644
--- a/Modules/_sqlite/module.c
+++ b/Modules/_sqlite/module.c
@@ -203,7 +203,7 @@ static PyObject* module_register_converter(PyObject* self, PyObject* args)
}
/* convert the name to upper case */
- name = _PyObject_CallMethodId(orig_name, &PyId_upper, NULL);
+ name = _PyObject_CallMethodIdNoArgs(orig_name, &PyId_upper);
if (!name) {
goto error;
}