diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_codecsmodule.c | 2 | ||||
-rw-r--r-- | Modules/_ctypes/_ctypes.c | 14 |
2 files changed, 9 insertions, 7 deletions
diff --git a/Modules/_codecsmodule.c b/Modules/_codecsmodule.c index 9a1470021e..6877238036 100644 --- a/Modules/_codecsmodule.c +++ b/Modules/_codecsmodule.c @@ -61,7 +61,7 @@ PyDoc_STRVAR(lookup__doc__, "lookup(encoding) -> CodecInfo\n\ \n\ Looks up a codec tuple in the Python codec registry and returns\n\ -a tuple of function (or a CodecInfo object)."); +a CodecInfo object."); static PyObject *codec_lookup(PyObject *self, PyObject *args) diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index a509d4b010..360046bd0d 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -599,13 +599,14 @@ CDataType_in_dll(PyObject *type, PyObject *args) #else address = (void *)ctypes_dlsym(handle, name); if (!address) { - PyErr_Format(PyExc_ValueError, #ifdef __CYGWIN__ /* dlerror() isn't very helpful on cygwin */ + PyErr_Format(PyExc_ValueError, "symbol '%s' not found (%s) ", - name, + name); +#else + PyErr_SetString(PyExc_ValueError, ctypes_dlerror()); #endif - ctypes_dlerror()); return NULL; } #endif @@ -3283,13 +3284,14 @@ CFuncPtr_FromDll(PyTypeObject *type, PyObject *args, PyObject *kwds) #else address = (PPROC)ctypes_dlsym(handle, name); if (!address) { - PyErr_Format(PyExc_AttributeError, #ifdef __CYGWIN__ /* dlerror() isn't very helpful on cygwin */ + PyErr_Format(PyExc_AttributeError, "function '%s' not found (%s) ", - name, + name); +#else + PyErr_SetString(PyExc_AttributeError, ctypes_dlerror()); #endif - ctypes_dlerror()); return NULL; } #endif |