void Perl_ithread_set (pTHX_ ithread* thread)
{
- SV* thread_sv = newSViv((IV)thread);
+ SV* thread_sv = newSViv(PTR2IV(thread));
if(!hv_store(PL_modglobal, "threads::self", 12, thread_sv,0)) {
croak("%s\n","Internal error, couldn't set TLS");
}
if(!thread_sv) {
croak("%s\n","Internal error, couldn't get TLS");
}
- return (ithread*)SvIV(*thread_sv);
+ return INT2PTR(ithread*,SvIV(*thread_sv));
}