diff options
-rw-r--r-- | Modules/_ctypes/callproc.c | 4 | ||||
-rw-r--r-- | Modules/_ctypes/cfield.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c index 7af4bfb..419beb1 100644 --- 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 index 7fe984d..e033cd5 100644 --- 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 /******************************************************************/ |