Skip to content

Commit 106f5f7

Browse files
committed
Add _imp.is_frozen_package
1 parent 0acce07 commit 106f5f7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

vm/src/stdlib/imp.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ fn imp_init_frozen(name: PyStringRef, vm: &VirtualMachine) -> PyResult {
7272
}
7373
}
7474

75+
fn imp_is_frozen_package(_name: PyStringRef, _vm: &VirtualMachine) -> bool {
76+
// TODO: Support frozen package.
77+
false
78+
}
79+
7580
pub fn make_module(vm: &VirtualMachine) -> PyObjectRef {
7681
let ctx = &vm.ctx;
7782
let module = py_module!(vm, "_imp", {
@@ -85,6 +90,7 @@ pub fn make_module(vm: &VirtualMachine) -> PyObjectRef {
8590
"exec_builtin" => ctx.new_rustfunc(imp_exec_builtin),
8691
"get_frozen_object" => ctx.new_rustfunc(imp_get_frozen_object),
8792
"init_frozen" => ctx.new_rustfunc(imp_init_frozen),
93+
"is_frozen_package" => ctx.new_rustfunc(imp_is_frozen_package),
8894
});
8995

9096
module

0 commit comments

Comments
 (0)