Mercurial > cpython-lru_cache-weakref
comparison Python/pythonrun.c @ 2128:92da8901517e legacy-trunk
use getbuiltins() everywhere, it defaults to getbuiltidict()
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 12 Jan 1995 11:37:57 +0000 |
| parents | b7be0382f9ee |
| children | d3b5be0c872f |
comparison
equal
deleted
inserted
replaced
| 2127:695401692c46 | 2128:92da8901517e |
|---|---|
| 98 m = add_module("__main__"); | 98 m = add_module("__main__"); |
| 99 if (m == NULL) | 99 if (m == NULL) |
| 100 fatal("can't create __main__ module"); | 100 fatal("can't create __main__ module"); |
| 101 d = getmoduledict(m); | 101 d = getmoduledict(m); |
| 102 if (dictlookup(d, "__builtins__") == NULL) { | 102 if (dictlookup(d, "__builtins__") == NULL) { |
| 103 if (dictinsert(d, "__builtins__", getbuiltindict())) | 103 if (dictinsert(d, "__builtins__", getbuiltins())) |
| 104 fatal("can't add __builtins__ to __main__"); | 104 fatal("can't add __builtins__ to __main__"); |
| 105 } | 105 } |
| 106 } | 106 } |
| 107 | 107 |
| 108 /* Parse input from a file and execute it */ | 108 /* Parse input from a file and execute it */ |
