Mercurial > cpython-lru_cache-weakref
comparison Python/ceval.c @ 14080:5778f93cf22b legacy-trunk
Fix the bug Sjoerd Mullender discovered, where find_from_args() wasn't
trying hard enough to find out what the arguments to an import were. There
is no test-case for this bug, yet, but this is what it looked like:
from encodings import cp1006, cp1026
ImportError: cannot import name cp1026
'__import__' was called with only the first name in the 'arguments' list.
| author | Thomas Wouters <thomas@python.org> |
|---|---|
| date | Sun, 20 Aug 2000 14:01:53 +0000 |
| parents | 03401af36b5c |
| children | 2de0cc174c3b |
comparison
equal
deleted
inserted
replaced
| 14079:51c2eed60159 | 14080:5778f93cf22b |
|---|---|
| 2862 Py_DECREF(name); | 2862 Py_DECREF(name); |
| 2863 } | 2863 } |
| 2864 } else { | 2864 } else { |
| 2865 do { | 2865 do { |
| 2866 oparg = (next_instr[1]<<8) + next_instr[0]; | 2866 oparg = (next_instr[1]<<8) + next_instr[0]; |
| 2867 next_instr += 2; | 2867 /* Jump over our own argument, the next instruction |
| 2868 (which is a STORE), and its argument.*/ | |
| 2869 next_instr += 5; | |
| 2868 name = Getnamev(f, oparg); | 2870 name = Getnamev(f, oparg); |
| 2869 if (PyList_Append(list, name) < 0) { | 2871 if (PyList_Append(list, name) < 0) { |
| 2870 Py_DECREF(list); | 2872 Py_DECREF(list); |
| 2871 break; | 2873 break; |
| 2872 } | 2874 } |
