summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/sysmodule.c8
-rw-r--r--Python/thread_nt.h22
2 files changed, 3 insertions, 27 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index c170bd5..a54f266 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -2000,7 +2000,7 @@ sys_update_path(int argc, wchar_t **argv)
#endif
#if defined(HAVE_REALPATH)
wchar_t fullpath[MAXPATHLEN];
-#elif defined(MS_WINDOWS) && !defined(MS_WINCE)
+#elif defined(MS_WINDOWS)
wchar_t fullpath[MAX_PATH];
#endif
@@ -2039,10 +2039,8 @@ sys_update_path(int argc, wchar_t **argv)
#if SEP == '\\' /* Special case for MS filename syntax */
if (_HAVE_SCRIPT_ARGUMENT(argc, argv)) {
wchar_t *q;
-#if defined(MS_WINDOWS) && !defined(MS_WINCE)
- /* This code here replaces the first element in argv with the full
- path that it represents. Under CE, there are no relative paths so
- the argument must be the full path anyway. */
+#if defined(MS_WINDOWS)
+ /* Replace the first element in argv with the full path. */
wchar_t *ptemp;
if (GetFullPathNameW(argv0,
Py_ARRAY_LENGTH(fullpath),
diff --git a/Python/thread_nt.h b/Python/thread_nt.h
index b29b1b6..cb0e995 100644
--- a/Python/thread_nt.h
+++ b/Python/thread_nt.h
@@ -161,11 +161,7 @@ typedef struct {
/* thunker to call adapt between the function type used by the system's
thread start function and the internally used one. */
-#if defined(MS_WINCE)
-static DWORD WINAPI
-#else
static unsigned __stdcall
-#endif
bootstrap(void *call)
{
callobj *obj = (callobj*)call;
@@ -193,32 +189,18 @@ PyThread_start_new_thread(void (*func)(void *), void *arg)
return -1;
obj->func = func;
obj->arg = arg;
-#if defined(MS_WINCE)
- hThread = CreateThread(NULL,
- Py_SAFE_DOWNCAST(_pythread_stacksize, Py_ssize_t, SIZE_T),
- bootstrap, obj, 0, &threadID);
-#else
hThread = (HANDLE)_beginthreadex(0,
Py_SAFE_DOWNCAST(_pythread_stacksize,
Py_ssize_t, unsigned int),
bootstrap, obj,
0, &threadID);
-#endif
if (hThread == 0) {
-#if defined(MS_WINCE)
- /* Save error in variable, to prevent PyThread_get_thread_ident
- from clobbering it. */
- unsigned e = GetLastError();
- dprintf(("%ld: PyThread_start_new_thread failed, win32 error code %u\n",
- PyThread_get_thread_ident(), e));
-#else
/* I've seen errno == EAGAIN here, which means "there are
* too many threads".
*/
int e = errno;
dprintf(("%ld: PyThread_start_new_thread failed, errno %d\n",
PyThread_get_thread_ident(), e));
-#endif
threadID = (unsigned)-1;
HeapFree(GetProcessHeap(), 0, obj);
}
@@ -249,11 +231,7 @@ PyThread_exit_thread(void)
dprintf(("%ld: PyThread_exit_thread called\n", PyThread_get_thread_ident()));
if (!initialized)
exit(0);
-#if defined(MS_WINCE)
- ExitThread(0);
-#else
_endthreadex(0);
-#endif
}
/*