[Python-checkins] cpython (2.7): Issue #22463: Cure unused function warnings on AIX

martin.panter python-checkins at python.org
Tue Jun 21 22:49:57 EDT 2016


https://hg.python.org/cpython/rev/ffe866aa86a8
changeset: 102120:ffe866aa86a8
branch: 2.7
user: Martin Panter <vadmium+py at gmail.com>
date: Wed Jun 22 02:46:33 2016 +0000
summary:
 Issue #22463: Cure unused function warnings on AIX
files:
 Modules/_ctypes/callproc.c | 4 +++-
 Modules/_ctypes/cfield.c | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c
--- a/Modules/_ctypes/callproc.c
+++ b/Modules/_ctypes/callproc.c
@@ -92,8 +92,10 @@
 #define CTYPES_CAPSULE_ERROROBJ "_ctypes/callproc.c error object"
 CTYPES_CAPSULE_INSTANTIATE_DESTRUCTOR(CTYPES_CAPSULE_ERROROBJ)
 
-#define CTYPES_CAPSULE_WCHAR_T "_ctypes/callproc.c wchar_t buffer from unicode"
+#if defined(CTYPES_UNICODE) && !defined(HAVE_USABLE_WCHAR_T)
+# define CTYPES_CAPSULE_WCHAR_T "_ctypes/callproc.c wchar_t buffer from unicode"
 CTYPES_CAPSULE_INSTANTIATE_DESTRUCTOR(CTYPES_CAPSULE_WCHAR_T)
+#endif
 
 /*
 ctypes maintains thread-local storage that has space for two error numbers:
diff --git a/Modules/_ctypes/cfield.c b/Modules/_ctypes/cfield.c
--- a/Modules/_ctypes/cfield.c
+++ b/Modules/_ctypes/cfield.c
@@ -12,8 +12,10 @@
 #include "ctypes.h"
 
 
-#define CTYPES_CAPSULE_WCHAR_T "_ctypes/cfield.c wchar_t buffer from unicode"
+#if defined(CTYPES_UNICODE) && !defined(HAVE_USABLE_WCHAR_T)
+# define CTYPES_CAPSULE_WCHAR_T "_ctypes/cfield.c wchar_t buffer from unicode"
 CTYPES_CAPSULE_INSTANTIATE_DESTRUCTOR(CTYPES_CAPSULE_WCHAR_T)
+#endif
 
 
 /******************************************************************/
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /