mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
Make incognito a CodeFlag bit
This commit is contained in:
@@ -281,7 +281,7 @@ impl PyFunction {
|
||||
|
||||
#[pyproperty(magic)]
|
||||
fn globals(&self, vm: &VirtualMachine) -> PyResult<PyDictRef> {
|
||||
if self.code.incognito {
|
||||
if self.code.incognito() {
|
||||
Err(vm.new_type_error("Can't get __globals__ on an incognito function".to_owned()))
|
||||
} else {
|
||||
Ok(self.scope.globals.clone())
|
||||
|
||||
Reference in New Issue
Block a user