summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-04-04 07:06:58 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-04-04 07:06:58 (GMT)
commitf8aa133cce70472ec7baa21c8b073891101dce15 (patch)
treec3b4b3327b0bccb120f5e802bc7f4ca03bf20dbd
parenta110eb4331dd2d005de66c751472c9d87ce716e5 (diff)
parent2e229e025c5be101fbaaa5ace453fd78e5bffdd1 (diff)
downloadcpython-f8aa133cce70472ec7baa21c8b073891101dce15.zip
cpython-f8aa133cce70472ec7baa21c8b073891101dce15.tar.gz
cpython-f8aa133cce70472ec7baa21c8b073891101dce15.tar.bz2
Issue #23338: Fixed formatting ctypes error messages on Cygwin.
Patch by Makoto Kato.
-rw-r--r--Misc/ACKS1
-rw-r--r--Misc/NEWS3
-rw-r--r--Modules/_ctypes/_ctypes.c4
3 files changed, 6 insertions, 2 deletions
diff --git a/Misc/ACKS b/Misc/ACKS
index 3637ab4..6e24cc9 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -703,6 +703,7 @@ Janne Karila
Per Øyvind Karlsen
Anton Kasyanov
Lou Kates
+Makoto Kato
Hiroaki Kawai
Brian Kearns
Sebastien Keim
diff --git a/Misc/NEWS b/Misc/NEWS
index 8e6ad31..a15600b 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -19,6 +19,9 @@ Core and Builtins
Library
-------
+- Issue #23338: Fixed formatting ctypes error messages on Cygwin.
+ Patch by Makoto Kato.
+
- Issue #15582: inspect.getdoc() now follows inheritance chains.
- Issue #2175: SAX parsers now support a character stream of InputSource object.
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c
index 6531aec..70fb08c 100644
--- a/Modules/_ctypes/_ctypes.c
+++ b/Modules/_ctypes/_ctypes.c
@@ -593,7 +593,7 @@ CDataType_in_dll(PyObject *type, PyObject *args)
#ifdef __CYGWIN__
/* dlerror() isn't very helpful on cygwin */
PyErr_Format(PyExc_ValueError,
- "symbol '%s' not found (%s) ",
+ "symbol '%s' not found",
name);
#else
PyErr_SetString(PyExc_ValueError, ctypes_dlerror());
@@ -3280,7 +3280,7 @@ PyCFuncPtr_FromDll(PyTypeObject *type, PyObject *args, PyObject *kwds)
#ifdef __CYGWIN__
/* dlerror() isn't very helpful on cygwin */
PyErr_Format(PyExc_AttributeError,
- "function '%s' not found (%s) ",
+ "function '%s' not found",
name);
#else
PyErr_SetString(PyExc_AttributeError, ctypes_dlerror());