mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
Add lazy import filter
This commit is contained in:
parent
9eef03cc80
commit
de281fd894
21 changed files with 343 additions and 11 deletions
5
Python/generated_cases.c.h
generated
5
Python/generated_cases.c.h
generated
|
|
@ -6223,11 +6223,12 @@
|
|||
level = stack_pointer[-2];
|
||||
PyObject *name = GETITEM(FRAME_CO_NAMES, oparg >> 2);
|
||||
PyObject *res_o;
|
||||
if (oparg & 0x01) {
|
||||
if (!(oparg & 0x02)) {
|
||||
_PyFrame_SetStackPointer(frame, stack_pointer);
|
||||
res_o = _PyEval_LazyImportName(tstate, BUILTINS(), GLOBALS(), LOCALS(), name,
|
||||
PyStackRef_AsPyObjectBorrow(fromlist),
|
||||
PyStackRef_AsPyObjectBorrow(level));
|
||||
PyStackRef_AsPyObjectBorrow(level),
|
||||
oparg & 0x01);
|
||||
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||
} else {
|
||||
_PyFrame_SetStackPointer(frame, stack_pointer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue