]> granicus.if.org Git - python/commit
The code in PyImport_Import() tried to save itself a bit of work and
authorGuido van Rossum <guido@python.org>
Tue, 20 Feb 2001 21:43:24 +0000 (21:43 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 20 Feb 2001 21:43:24 +0000 (21:43 +0000)
commit85cd1d690cfd0bad9b6ee98578fadf2a7d8988e9
tree8328e0e5e2edb9f8db5054b309cfaabec35706b6
parent8b41116c2268ce867bfc550146f50f792951c678
The code in PyImport_Import() tried to save itself a bit of work and
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.
Python/import.c