From adb12ee4d6908d7871acf6a17efbe8db94a74f9c Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Thu, 22 Mar 2001 02:32:48 +0000 Subject: If a code object is compiled with nested scopes, define the CO_NESTED flag. Add PyEval_GetNestedScopes() which returns a non-zero value if the code for the current interpreter frame has CO_NESTED defined. --- Python/compile.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Python/compile.c') diff --git a/Python/compile.c b/Python/compile.c index cd936a3aff..81be103515 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -4276,6 +4276,8 @@ static int symtable_update_flags(struct compiling *c, PySymtableEntryObject *ste, struct symbol_info *si) { + if (c->c_future && c->c_future->ff_nested_scopes) + c->c_flags |= CO_NESTED; if (ste->ste_type != TYPE_MODULE) c->c_flags |= CO_NEWLOCALS; if (ste->ste_type == TYPE_FUNCTION) { -- cgit v1.2.1