summaryrefslogtreecommitdiff
path: root/Modules/_sqlite/row.c
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2017-02-04 15:39:38 -0800
committerSteve Dower <steve.dower@microsoft.com>2017-02-04 15:39:38 -0800
commit1a5780aabb550cae175ad8711e2f33ba644d0ddb (patch)
tree68e47eaafb4ccc17bbdb7668c6058984945b332d /Modules/_sqlite/row.c
parent956c7cfa7111ab5458e2f69868a05b7b84fc6843 (diff)
parentd1d8706cdb77e2adbbb4110338dcda0e1811f892 (diff)
downloadcpython-1a5780aabb550cae175ad8711e2f33ba644d0ddb.tar.gz
Issue #29319: Prevent RunMainFromImporter overwriting sys.path[0].
Diffstat (limited to 'Modules/_sqlite/row.c')
-rw-r--r--Modules/_sqlite/row.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_sqlite/row.c b/Modules/_sqlite/row.c
index 07584e30e5..53342f3444 100644
--- a/Modules/_sqlite/row.c
+++ b/Modules/_sqlite/row.c
@@ -98,7 +98,7 @@ PyObject* pysqlite_row_subscript(pysqlite_Row* self, PyObject* idx)
Py_XINCREF(item);
return item;
} else if (PyUnicode_Check(idx)) {
- key = _PyUnicode_AsString(idx);
+ key = PyUnicode_AsUTF8(idx);
if (key == NULL)
return NULL;
@@ -108,7 +108,7 @@ PyObject* pysqlite_row_subscript(pysqlite_Row* self, PyObject* idx)
PyObject *obj;
obj = PyTuple_GET_ITEM(self->description, i);
obj = PyTuple_GET_ITEM(obj, 0);
- compare_key = _PyUnicode_AsString(obj);
+ compare_key = PyUnicode_AsUTF8(obj);
if (!compare_key) {
return NULL;
}