• Guido van Rossum's avatar
    The code in PyImport_Import() tried to save itself a bit of work and · 85cd1d69
    Guido van Rossum yazdı
    save the __builtin__ module in a static variable.  But this doesn't
    work across Py_Finalise()/Py_Initialize()!  It also doesn't work when
    using multiple interpreter states created with PyInterpreterState_New().
    
    So I'm ripping out this small optimization.
    
    This was probably broken since PyImport_Import() was introduced in
    1997!  We really need a better test suite for multiple interpreter
    states and repeatedly initializing.
    
    This fixes the problems Barry reported in Demo/embed/loop.c.
    85cd1d69
import.c 56 KB