diff options
author | Guido van Rossum <guido@python.org> | 1993-10-18 17:06:59 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1993-10-18 17:06:59 (GMT) |
commit | db3165e6559c6b83373e7fed9cdf4371552a9a8e (patch) | |
tree | 97b057363244668ebec6630553a86ad2206e3fd2 /Objects | |
parent | cacd9579d48cb1e2acc3536c9701987b118edf8c (diff) | |
download | cpython-db3165e6559c6b83373e7fed9cdf4371552a9a8e.zip cpython-db3165e6559c6b83373e7fed9cdf4371552a9a8e.tar.gz cpython-db3165e6559c6b83373e7fed9cdf4371552a9a8e.tar.bz2 |
* 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.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/fileobject.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c index 99cdba2..b981bb8 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -52,6 +52,16 @@ getfilefile(f) } 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; char *name; |