]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
More PyImport_ImportModule -> PyImport_ImportModuleNoBlock
authorChristian Heimes <christian@cheimes.de>
Thu, 3 Jan 2008 23:05:47 +0000 (23:05 +0000)
committerChristian Heimes <christian@cheimes.de>
Thu, 3 Jan 2008 23:05:47 +0000 (23:05 +0000)
Parser/tokenizer.c
Python/ast.c
Python/bltinmodule.c
Python/codecs.c

index d17da2aa0b223c95360a2f52573a1a0f921009a4..79ed87da01f1212910fca1eccb2a93f3111d3b77 100644 (file)
@@ -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;
 
index 3169de9216da296b512dd2ea86f1afa4d9c5ccb8..97486c55155f071c5208232b9adb645f8dc3a0dc 100644 (file)
@@ -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;
index 98285b98c07e7a64184646f259603eae781b1cc4..05ae915ec67ce9426cd0e361cd0276dc67007116 100644 (file)
@@ -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");
index 5a0e4884dbac6019702da139d4bd45716485802e..86941b1bdfbac0cd28ecec6b6c042a936db1935c 100644 (file)
@@ -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