summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/Python/import.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/tools/python3/Python/import.c')
-rw-r--r--contrib/tools/python3/Python/import.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/tools/python3/Python/import.c b/contrib/tools/python3/Python/import.c
index 456f6c40b54..f9317bb8042 100644
--- a/contrib/tools/python3/Python/import.c
+++ b/contrib/tools/python3/Python/import.c
@@ -2986,7 +2986,7 @@ find_frozen(PyObject *nameobj, struct frozen_info *info)
if (nameobj == NULL || nameobj == Py_None) {
return FROZEN_BAD_NAME;
}
- const char *name = PyUnicode_AsUTF8(nameobj);
+ const char *name = _PyUnicode_AsUTF8NoNUL(nameobj);
if (name == NULL) {
// Note that this function previously used
// _PyUnicode_EqualToASCIIString(). We clear the error here
@@ -4319,13 +4319,14 @@ _imp.acquire_lock
Acquires the interpreter's import lock for the current thread.
-This lock should be used by import hooks to ensure thread-safety when importing
-modules. On platforms without threads, this function does nothing.
+This lock should be used by import hooks to ensure thread-safety when
+importing modules. On platforms without threads, this function does
+nothing.
[clinic start generated code]*/
static PyObject *
_imp_acquire_lock_impl(PyObject *module)
-/*[clinic end generated code: output=1aff58cb0ee1b026 input=4a2d4381866d5fdc]*/
+/*[clinic end generated code: output=1aff58cb0ee1b026 input=60e9c1b4ab471ead]*/
{
PyInterpreterState *interp = _PyInterpreterState_GET();
_PyImport_AcquireLock(interp);