diff options
-rwxr-xr-x | ext/threads/threads.h | 2 | ||||
-rwxr-xr-x | ext/threads/threads.xs | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/ext/threads/threads.h b/ext/threads/threads.h index ddfe29e2ea..5fef2bde18 100755 --- a/ext/threads/threads.h +++ b/ext/threads/threads.h @@ -47,7 +47,7 @@ shared_sv* threads; #ifdef WIN32 THREAD_RET_TYPE Perl_thread_run(LPVOID arg); #else -void Perl_thread_run(void * arg); +void* Perl_thread_run(void * arg); #endif void Perl_thread_destruct(ithread* thread); diff --git a/ext/threads/threads.xs b/ext/threads/threads.xs index 3e9a1f9caf..1e6d442262 100755 --- a/ext/threads/threads.xs +++ b/ext/threads/threads.xs @@ -13,7 +13,7 @@ #ifdef WIN32 THREAD_RET_TYPE Perl_thread_run(LPVOID arg) { #else -void Perl_thread_run(void * arg) { +void* Perl_thread_run(void * arg) { #endif ithread* thread = (ithread*) arg; SV* thread_tid_ptr; @@ -74,6 +74,8 @@ void Perl_thread_run(void * arg) { } #ifdef WIN32 return (DWORD)0; +#else + return 0; #endif } @@ -168,7 +170,7 @@ SV* Perl_thread_create(char* class, SV* init_function, SV* params) { (LPVOID)thread, 0, &thread->thr); #else - pthread_create( &thread->thr, NULL, (void *) Perl_thread_run, thread); + pthread_create( &thread->thr, NULL, Perl_thread_run, thread); #endif MUTEX_UNLOCK(&create_mutex); @@ -288,7 +290,7 @@ BOOT: PL_perl_destruct_level = 2; threads = Perl_sharedsv_new(aTHX); SHAREDSvEDIT(threads); - ((HV*) SHAREDSvGET(threads)) = newHV(); + SHAREDSvGET(threads) = (SV *)newHV(); SHAREDSvRELEASE(threads); { |