diff options
author | Thomas Wouters <thomas@python.org> | 2000-08-27 20:31:27 (GMT) |
---|---|---|
committer | Thomas Wouters <thomas@python.org> | 2000-08-27 20:31:27 (GMT) |
commit | dd13e4f91ff2d8824e852afaec59d95d7dd409b3 (patch) | |
tree | 89497ccf5d8b6307d7b32bb71a8142c00b494bfa /Python/import.c | |
parent | e868211e106d4da348925e1c1bd1ea62b3560721 (diff) | |
download | cpython-dd13e4f91ff2d8824e852afaec59d95d7dd409b3.zip cpython-dd13e4f91ff2d8824e852afaec59d95d7dd409b3.tar.gz cpython-dd13e4f91ff2d8824e852afaec59d95d7dd409b3.tar.bz2 |
Replace the run-time 'future-bytecode-stream-inspection' hack to find out
how 'import' was called with a compiletime mechanism: create either a tuple
of the import arguments, or None (in the case of a normal import), add it to
the code-block constants, and load it onto the stack before calling
IMPORT_NAME.
Diffstat (limited to 'Python/import.c')
-rw-r--r-- | Python/import.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/import.c b/Python/import.c index f38ee41..2e058bd 100644 --- a/Python/import.c +++ b/Python/import.c @@ -66,7 +66,7 @@ extern time_t PyOS_GetLastModificationTime(char *, FILE *); /* XXX Perhaps the magic number should be frozen and a version field added to the .pyc file header? */ /* New way to come up with the magic number: (YEAR-1995), MONTH, DAY */ -#define MAGIC (50822 | ((long)'\r'<<16) | ((long)'\n'<<24)) +#define MAGIC (50823 | ((long)'\r'<<16) | ((long)'\n'<<24)) /* Magic word as global; note that _PyImport_Init() can change the value of this global to accommodate for alterations of how the @@ -1401,7 +1401,7 @@ PyImport_ImportModule(char *name) { static PyObject *fromlist = NULL; if (fromlist == NULL && strchr(name, '.') != NULL) { - fromlist = Py_BuildValue("[s]", "*"); + fromlist = Py_BuildValue("(s)", "*"); if (fromlist == NULL) return NULL; } |