summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-01-03 23:05:47 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-01-03 23:05:47 (GMT)
commit819b8bf403f19017f9e7ea11cd83699b517f3394 (patch)
tree4dd4375104b5d3f1a9acb3c45909f04330240295
parent072c0f1b7e3d83dec98313bc07ae92ed15fe7e6d (diff)
downloadcpython-819b8bf403f19017f9e7ea11cd83699b517f3394.zip
cpython-819b8bf403f19017f9e7ea11cd83699b517f3394.tar.gz
cpython-819b8bf403f19017f9e7ea11cd83699b517f3394.tar.bz2
More PyImport_ImportModule -> PyImport_ImportModuleNoBlock
-rw-r--r--Parser/tokenizer.c2
-rw-r--r--Python/ast.c2
-rw-r--r--Python/bltinmodule.c4
-rw-r--r--Python/codecs.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index d17da2a..79ed87d 100644
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -452,7 +452,7 @@ fp_setreadl(struct tok_state *tok, const char* enc)
{
PyObject *readline = NULL, *stream = NULL, *io = NULL;
- io = PyImport_ImportModule("io");
+ io = PyImport_ImportModuleNoBlock("io");
if (io == NULL)
goto cleanup;
diff --git a/Python/ast.c b/Python/ast.c
index 3169de9..97486c5 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -56,7 +56,7 @@ new_identifier(const char* n, PyArena *arena)
identifier; if so, normalize to NFKC. */
for (; *u; u++) {
if (*u >= 128) {
- PyObject *m = PyImport_ImportModule("unicodedata");
+ PyObject *m = PyImport_ImportModuleNoBlock("unicodedata");
PyObject *id2;
if (!m)
return NULL;
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 98285b9..05ae915 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -281,7 +281,7 @@ static PyObject *
builtin_filter(PyObject *self, PyObject *args)
{
PyObject *itertools, *ifilter, *result;
- itertools = PyImport_ImportModule("itertools");
+ itertools = PyImport_ImportModuleNoBlock("itertools");
if (itertools == NULL)
return NULL;
ifilter = PyObject_GetAttrString(itertools, "ifilter");
@@ -796,7 +796,7 @@ static PyObject *
builtin_map(PyObject *self, PyObject *args)
{
PyObject *itertools, *imap, *result;
- itertools = PyImport_ImportModule("itertools");
+ itertools = PyImport_ImportModuleNoBlock("itertools");
if (itertools == NULL)
return NULL;
imap = PyObject_GetAttrString(itertools, "imap");
diff --git a/Python/codecs.c b/Python/codecs.c
index 5a0e488..86941b1 100644
--- a/Python/codecs.c
+++ b/Python/codecs.c
@@ -850,7 +850,7 @@ static int _PyCodecRegistry_Init(void)
interp->codec_error_registry == NULL)
Py_FatalError("can't initialize codec registry");
- mod = PyImport_ImportModuleLevel("encodings", NULL, NULL, NULL, 0);
+ mod = PyImport_ImportModuleNoBlock("encodings");
if (mod == NULL) {
if (PyErr_ExceptionMatches(PyExc_ImportError)) {
/* Ignore ImportErrors... this is done so that