mirror of
https://github.com/python/cpython.git
synced 2025-08-27 20:25:18 +00:00
Fix text failures when ctypes is not available
(followup to Victor's 85d11cf67aa8 and 7a50e549bd11)
This commit is contained in:
parent
4637309ee6
commit
00b2c86d09
2 changed files with 39 additions and 28 deletions
|
@ -3,9 +3,14 @@ import unittest
|
|||
import codecs
|
||||
import locale
|
||||
import sys, _testcapi, io
|
||||
import ctypes
|
||||
|
||||
SIZEOF_WCHAR_T = ctypes.sizeof(ctypes.c_wchar)
|
||||
try:
|
||||
import ctypes
|
||||
except ImportError:
|
||||
ctypes = None
|
||||
SIZEOF_WCHAR_T = -1
|
||||
else:
|
||||
SIZEOF_WCHAR_T = ctypes.sizeof(ctypes.c_wchar)
|
||||
|
||||
class Queue(object):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue