blob: 29db947a52dd2a2393f8eb73524e2572133df238 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
--- a/Python/importdl.c (index)
+++ b/Python/importdl.c (working tree)
@@ -191,6 +191,11 @@ _Py_ext_module_loader_info_init_for_builtin(
.hook_prefix=ascii_only_prefix,
.newcontext=NULL,
};
+ info->newcontext = PyUnicode_AsUTF8(name);
+ if (info->newcontext == NULL) {
+ _Py_ext_module_loader_info_clear(info);
+ return -1;
+ }
return 0;
}
|