mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
* bltinmodule.c: removed exec() built-in function.
* Grammar: add exec statement; allow testlist in expr statement. * ceval.c, compile.c, opcode.h: support exec statement; avoid optimizing locals when it is used * fileobject.{c,h}: add getfilename() internal function.
This commit is contained in:
parent
cacd9579d4
commit
db3165e655
9 changed files with 600 additions and 451 deletions
|
@ -51,6 +51,16 @@ getfilefile(f)
|
|||
return ((fileobject *)f)->f_fp;
|
||||
}
|
||||
|
||||
object *
|
||||
getfilename(f)
|
||||
object *f;
|
||||
{
|
||||
if (f == NULL || !is_fileobject(f))
|
||||
return NULL;
|
||||
else
|
||||
return ((fileobject *)f)->f_name;
|
||||
}
|
||||
|
||||
object *
|
||||
newopenfileobject(fp, name, mode, close)
|
||||
FILE *fp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue