Fixed problem with type casting void* to int.
This commit is contained in:
parent
a4a08c3ce6
commit
019994548c
|
@ -246,16 +246,17 @@ realMain(void)
|
||||||
|
|
||||||
static
|
static
|
||||||
void
|
void
|
||||||
realMainEntry(void*)
|
realMainEntry(void* vresult)
|
||||||
{
|
{
|
||||||
CThread::exit(reinterpret_cast<void*>(realMain()));
|
*reinterpret_cast<int*>(vresult) = realMain();
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
int
|
int
|
||||||
runMainInThread(void)
|
runMainInThread(void)
|
||||||
{
|
{
|
||||||
CThread appThread(new CFunctionJob(&realMainEntry));
|
int result;
|
||||||
|
CThread appThread(new CFunctionJob(&realMainEntry, &result));
|
||||||
try {
|
try {
|
||||||
#if WINDOWS_LIKE
|
#if WINDOWS_LIKE
|
||||||
MSG msg;
|
MSG msg;
|
||||||
|
@ -272,7 +273,7 @@ runMainInThread(void)
|
||||||
#else
|
#else
|
||||||
appThread.wait(-1.0);
|
appThread.wait(-1.0);
|
||||||
#endif
|
#endif
|
||||||
return reinterpret_cast<int>(appThread.getResult());
|
return result;
|
||||||
}
|
}
|
||||||
catch (XThread&) {
|
catch (XThread&) {
|
||||||
appThread.cancel();
|
appThread.cancel();
|
||||||
|
|
|
@ -268,16 +268,17 @@ realMain(void)
|
||||||
|
|
||||||
static
|
static
|
||||||
void
|
void
|
||||||
realMainEntry(void*)
|
realMainEntry(void* vresult)
|
||||||
{
|
{
|
||||||
CThread::exit(reinterpret_cast<void*>(realMain()));
|
*reinterpret_cast<int*>(vresult) = realMain();
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
int
|
int
|
||||||
runMainInThread(void)
|
runMainInThread(void)
|
||||||
{
|
{
|
||||||
CThread appThread(new CFunctionJob(&realMainEntry));
|
int result;
|
||||||
|
CThread appThread(new CFunctionJob(&realMainEntry, &result));
|
||||||
try {
|
try {
|
||||||
#if WINDOWS_LIKE
|
#if WINDOWS_LIKE
|
||||||
MSG msg;
|
MSG msg;
|
||||||
|
@ -292,7 +293,7 @@ runMainInThread(void)
|
||||||
#else
|
#else
|
||||||
appThread.wait(-1.0);
|
appThread.wait(-1.0);
|
||||||
#endif
|
#endif
|
||||||
return reinterpret_cast<int>(appThread.getResult());
|
return result;
|
||||||
}
|
}
|
||||||
catch (XThread&) {
|
catch (XThread&) {
|
||||||
appThread.cancel();
|
appThread.cancel();
|
||||||
|
|
Loading…
Reference in New Issue