_beginthreadex() entry point should really return unsigned and not wxUIntPtr even if this means that it's impossible to return pointers from wxThread::Entry() under Win64 (#9727)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -75,8 +75,9 @@
|
|||||||
// this is where _beginthreadex() is declared
|
// this is where _beginthreadex() is declared
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
|
|
||||||
// the return type of the thread function entry point
|
// the return type of the thread function entry point: notice that this
|
||||||
typedef wxUIntPtr THREAD_RETVAL;
|
// type can't hold a pointer under Win64
|
||||||
|
typedef unsigned THREAD_RETVAL;
|
||||||
|
|
||||||
// the calling convention of the thread function entry point
|
// the calling convention of the thread function entry point
|
||||||
#define THREAD_CALLCONV __stdcall
|
#define THREAD_CALLCONV __stdcall
|
||||||
@@ -528,7 +529,7 @@ THREAD_RETVAL wxThreadInternal::DoThreadStart(wxThread *thread)
|
|||||||
return THREAD_ERROR_EXIT;
|
return THREAD_ERROR_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = (THREAD_RETVAL)thread->Entry();
|
rc = wxPtrToUInt(thread->Entry());
|
||||||
}
|
}
|
||||||
wxCATCH_ALL( wxTheApp->OnUnhandledException(); )
|
wxCATCH_ALL( wxTheApp->OnUnhandledException(); )
|
||||||
|
|
||||||
@@ -1092,7 +1093,7 @@ wxThreadError wxThread::Resume()
|
|||||||
|
|
||||||
wxThread::ExitCode wxThread::Wait()
|
wxThread::ExitCode wxThread::Wait()
|
||||||
{
|
{
|
||||||
ExitCode rc = (ExitCode)THREAD_ERROR_EXIT;
|
ExitCode rc = wxUIntToPtr(THREAD_ERROR_EXIT);
|
||||||
|
|
||||||
// although under Windows we can wait for any thread, it's an error to
|
// although under Windows we can wait for any thread, it's an error to
|
||||||
// wait for a detached one in wxWin API
|
// wait for a detached one in wxWin API
|
||||||
|
Reference in New Issue
Block a user