|
16 | 16 | if __version__ != _ctypes_version: |
17 | 17 | raise Exception("Version number mismatch", __version__, _ctypes_version) |
18 | 18 |
|
19 | | -if _os.name in ("nt", "ce"): |
| 19 | +if _os.name == "nt": |
20 | 20 | from _ctypes import FormatError |
21 | 21 |
|
22 | 22 | DEFAULT_MODE = RTLD_LOCAL |
@@ -103,12 +103,9 @@ class CFunctionType(_CFuncPtr): |
103 | 103 | _c_functype_cache[(restype, argtypes, flags)] = CFunctionType |
104 | 104 | return CFunctionType |
105 | 105 |
|
106 | | -if _os.name in ("nt", "ce"): |
| 106 | +if _os.name == "nt": |
107 | 107 | from _ctypes import LoadLibrary as _dlopen |
108 | 108 | from _ctypes import FUNCFLAG_STDCALL as _FUNCFLAG_STDCALL |
109 | | - if _os.name == "ce": |
110 | | - # 'ce' doesn't have the stdcall calling convention |
111 | | - _FUNCFLAG_STDCALL = _FUNCFLAG_CDECL |
112 | 109 |
|
113 | 110 | _win_functype_cache = {} |
114 | 111 | def WINFUNCTYPE(restype, *argtypes, **kw): |
@@ -262,7 +259,7 @@ class c_wchar(_SimpleCData): |
262 | 259 | def _reset_cache(): |
263 | 260 | _pointer_type_cache.clear() |
264 | 261 | _c_functype_cache.clear() |
265 | | - if _os.name in ("nt", "ce"): |
| 262 | + if _os.name == "nt": |
266 | 263 | _win_functype_cache.clear() |
267 | 264 | # _SimpleCData.c_wchar_p_from_param |
268 | 265 | POINTER(c_wchar).from_param = c_wchar_p.from_param |
@@ -374,7 +371,7 @@ class PyDLL(CDLL): |
374 | 371 | """ |
375 | 372 | _func_flags_ = _FUNCFLAG_CDECL | _FUNCFLAG_PYTHONAPI |
376 | 373 |
|
377 | | -if _os.name in ("nt", "ce"): |
| 374 | +if _os.name == "nt": |
378 | 375 |
|
379 | 376 | class WinDLL(CDLL): |
380 | 377 | """This class represents a dll exporting functions using the |
@@ -427,15 +424,15 @@ def LoadLibrary(self, name): |
427 | 424 | cdll = LibraryLoader(CDLL) |
428 | 425 | pydll = LibraryLoader(PyDLL) |
429 | 426 |
|
430 | | -if _os.name in ("nt", "ce"): |
| 427 | +if _os.name == "nt": |
431 | 428 | pythonapi = PyDLL("python dll", None, _sys.dllhandle) |
432 | 429 | elif _sys.platform == "cygwin": |
433 | 430 | pythonapi = PyDLL("libpython%d.%d.dll" % _sys.version_info[:2]) |
434 | 431 | else: |
435 | 432 | pythonapi = PyDLL(None) |
436 | 433 |
|
437 | 434 |
|
438 | | -if _os.name in ("nt", "ce"): |
| 435 | +if _os.name == "nt": |
439 | 436 | windll = LibraryLoader(WinDLL) |
440 | 437 | oledll = LibraryLoader(OleDLL) |
441 | 438 |
|
@@ -503,7 +500,7 @@ def wstring_at(ptr, size=-1): |
503 | 500 | return _wstring_at(ptr, size) |
504 | 501 |
|
505 | 502 |
|
506 | | -if _os.name in ("nt", "ce"): # COM stuff |
| 503 | +if _os.name == "nt": # COM stuff |
507 | 504 | def DllGetClassObject(rclsid, riid, ppv): |
508 | 505 | try: |
509 | 506 | ccom = __import__("comtypes.server.inprocserver", globals(), locals(), ['*']) |
|
0 commit comments