Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2e229e0

Browse files
Issue #23338: Fixed formatting ctypes error messages on Cygwin.
Patch by Makoto Kato.
1 parent 9fa84b2 commit 2e229e0

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,7 @@ Janne Karila
692692
Per Øyvind Karlsen
693693
Anton Kasyanov
694694
Lou Kates
695+
Makoto Kato
695696
Hiroaki Kawai
696697
Sebastien Keim
697698
Ryan Kelly

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ Core and Builtins
2424
Library
2525
-------
2626

27+
- Issue #23338: Fixed formatting ctypes error messages on Cygwin.
28+
Patch by Makoto Kato.
29+
2730
- Issue #16840: Tkinter now supports 64-bit integers added in Tcl 8.4 and
2831
arbitrary precision integers added in Tcl 8.5.
2932

Modules/_ctypes/_ctypes.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ CDataType_in_dll(PyObject *type, PyObject *args)
593593
#ifdef __CYGWIN__
594594
/* dlerror() isn't very helpful on cygwin */
595595
PyErr_Format(PyExc_ValueError,
596-
"symbol '%s' not found (%s) ",
596+
"symbol '%s' not found",
597597
name);
598598
#else
599599
PyErr_SetString(PyExc_ValueError, ctypes_dlerror());
@@ -3279,7 +3279,7 @@ PyCFuncPtr_FromDll(PyTypeObject *type, PyObject *args, PyObject *kwds)
32793279
#ifdef __CYGWIN__
32803280
/* dlerror() isn't very helpful on cygwin */
32813281
PyErr_Format(PyExc_AttributeError,
3282-
"function '%s' not found (%s) ",
3282+
"function '%s' not found",
32833283
name);
32843284
#else
32853285
PyErr_SetString(PyExc_AttributeError, ctypes_dlerror());

0 commit comments

Comments
 (0)