summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_sqlite/connection.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index 319ed0c..ce46c1e 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -76,15 +76,10 @@ isolation_level_converter(PyObject *str_or_none, const char **result)
*result = NULL;
}
else if (PyUnicode_Check(str_or_none)) {
- Py_ssize_t sz;
- const char *str = PyUnicode_AsUTF8AndSize(str_or_none, &sz);
+ const char *str = PyUnicode_AsUTF8(str_or_none);
if (str == NULL) {
return 0;
}
- if (strlen(str) != (size_t)sz) {
- PyErr_SetString(PyExc_ValueError, "embedded null character");
- return 0;
- }
const char *level = get_isolation_level(str);
if (level == NULL) {