mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-46541: Replace _Py_IDENTIFIER with _Py_ID in sqlite3 (GH-31351)
This commit is contained in:
parent
d64f3caebe
commit
b2077117d1
5 changed files with 61 additions and 39 deletions
|
@ -21,8 +21,6 @@
|
|||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#define NEEDS_PY_IDENTIFIER
|
||||
|
||||
#include "cursor.h"
|
||||
#include "module.h"
|
||||
#include "util.h"
|
||||
|
@ -131,13 +129,12 @@ _pysqlite_get_converter(pysqlite_state *state, const char *keystr,
|
|||
PyObject *key;
|
||||
PyObject *upcase_key;
|
||||
PyObject *retval;
|
||||
_Py_IDENTIFIER(upper);
|
||||
|
||||
key = PyUnicode_FromStringAndSize(keystr, keylen);
|
||||
if (!key) {
|
||||
return NULL;
|
||||
}
|
||||
upcase_key = _PyObject_CallMethodIdNoArgs(key, &PyId_upper);
|
||||
upcase_key = PyObject_CallMethodNoArgs(key, state->str_upper);
|
||||
Py_DECREF(key);
|
||||
if (!upcase_key) {
|
||||
return NULL;
|
||||
|
@ -457,7 +454,7 @@ get_statement_from_cache(pysqlite_Cursor *self, PyObject *operation)
|
|||
return PyObject_Vectorcall(cache, args + 1, nargsf, NULL);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
PyObject *
|
||||
_pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject* operation, PyObject* second_argument)
|
||||
{
|
||||
PyObject* parameters_list = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue