diff options
author | Steve Dower <steve.dower@microsoft.com> | 2017-02-04 15:39:38 -0800 |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2017-02-04 15:39:38 -0800 |
commit | 1a5780aabb550cae175ad8711e2f33ba644d0ddb (patch) | |
tree | 68e47eaafb4ccc17bbdb7668c6058984945b332d /Modules/_sqlite/row.c | |
parent | 956c7cfa7111ab5458e2f69868a05b7b84fc6843 (diff) | |
parent | d1d8706cdb77e2adbbb4110338dcda0e1811f892 (diff) | |
download | cpython-1a5780aabb550cae175ad8711e2f33ba644d0ddb.tar.gz |
Issue #29319: Prevent RunMainFromImporter overwriting sys.path[0].
Diffstat (limited to 'Modules/_sqlite/row.c')
-rw-r--r-- | Modules/_sqlite/row.c | 4 |
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; } |