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));
}
{
ithread* current_thread;
AV* params = (AV*) SvRV(thread->params);
+ PerlInterpreter *other_perl = thread->interp;
CLONE_PARAMS clone_params;
clone_params.stashes = newAV();
clone_params.flags |= CLONEf_JOIN_IN;
PL_ptr_table = ptr_table_new();
current_thread = Perl_ithread_get(aTHX);
Perl_ithread_set(aTHX_ thread);
+ /* ensure 'meaningful' addresses retain their meaning */
+ ptr_table_store(PL_ptr_table, &other_perl->Isv_undef, &PL_sv_undef);
+ ptr_table_store(PL_ptr_table, &other_perl->Isv_no, &PL_sv_no);
+ ptr_table_store(PL_ptr_table, &other_perl->Isv_yes, &PL_sv_yes);
#if 0
{