diff --git a/lib/core/src/perl/CPlusPlus.xxs b/lib/core/src/perl/CPlusPlus.xxs index 90fd8fb..6098626 100644 --- a/lib/core/src/perl/CPlusPlus.xxs +++ b/lib/core/src/perl/CPlusPlus.xxs @@ -158,8 +158,8 @@ void defuse_lval_magic(pTHX_ SV* sv) { MGS *mgs; I32 mgs_ix; - assert(PL_savestack[PL_savestack_ix-1].any_i32==SAVEt_DESTRUCTOR_X); - mgs_ix=PL_savestack[PL_savestack_ix-2].any_i32; + assert(PL_savestack[PL_savestack_ix-1].any_uv==SAVEt_DESTRUCTOR_X); + mgs_ix=static_cast(PL_savestack[PL_savestack_ix-2].any_uv); mgs=SSPTR(mgs_ix, MGS*); assert(mgs->mgs_sv==sv); mgs->mgs_flags=0; @@ -417,7 +417,7 @@ SV* new_container_magic_sv(pTHX_ const container_vtbl* t, unsigned int flags, un AV* av=newAV(); int last_it= t->acc[2].begin ? 2 : 1; // has reverse_iterator? av_extend(av, last_it); - *(int*)(AvARRAY(av))=-1; // loop context index + AvARRAY(av)[0]=reinterpret_cast((IV)-1); // loop context index AvFILLp(av)=-1; // cached real container size AvREAL_off(av); // we'll destroy the iterator SVs manually @@ -521,7 +521,7 @@ int canned_container_access(pTHX_ SV *sv, MAGIC* mg, SV *nsv, const char *dummy, } else { it_index=1; it_incr=1; } - if (*(int*)(AvARRAY(my_av)) != cix) { + if (AvARRAY(my_av)[0] != reinterpret_cast((IV)cix)) { // new loop detected: need a new iterator if (!acct->begin) @@ -537,7 +537,7 @@ int canned_container_access(pTHX_ SV *sv, MAGIC* mg, SV *nsv, const char *dummy, mg->mg_ptr=(char*)obj; cx->blk_loop.state_u.ary.ary=my_av; } - *(int*)(AvARRAY(my_av))=cix; + AvARRAY(my_av)[0]=reinterpret_cast((IV)cix); AvARRAY(my_av)[it_index]=it_sv=newSV(0); sv_upgrade(it_sv, SVt_PVIV); sv_grow(it_sv, acct->obj_size); diff --git a/lib/core/src/perl/Scope.xs b/lib/core/src/perl/Scope.xs index ff07500..19089d1 100644 --- a/lib/core/src/perl/Scope.xs +++ b/lib/core/src/perl/Scope.xs @@ -420,7 +420,7 @@ LEAVE; for (f=frame_top-3; f >= frame_bottom; --f) if (mainstack[f].any_ptr == (void*)&localize_marker && f+2 < frame_top - && mainstack[f+2].any_i32 == SAVEt_DESTRUCTOR_X) { + && mainstack[f+2].any_uv == SAVEt_DESTRUCTOR_X) { if (scope != (AV*)mainstack[f+1].any_ptr) break; diff --git a/lib/core/src/perl/namespaces.xs b/lib/core/src/perl/namespaces.xs index 0b870bd..758d017 100644 --- a/lib/core/src/perl/namespaces.xs +++ b/lib/core/src/perl/namespaces.xs @@ -215,7 +215,7 @@ void insert_undo(pTHX_ int skip_frames) memcpy(to_restore->saved, saves, 3 * sizeof(to_restore->saved[0])); (saves++)->any_dxptr=&reset_ptrs; (saves++)->any_ptr=to_restore; - (saves++)->any_i32=SAVEt_DESTRUCTOR_X; + (saves++)->any_uv=SAVEt_DESTRUCTOR_X; } else { /* we are in the main script scope, no further enclosing contexts */ SV* restore_holder=newSV(0); @@ -225,7 +225,7 @@ void insert_undo(pTHX_ int skip_frames) saves=PL_savestack; memcpy(to_restore->saved, saves, 2 * sizeof(to_restore->saved[0])); saves[0].any_ptr=restore_holder; - saves[1].any_i32=SAVEt_FREESV; + saves[1].any_uv=SAVEt_FREESV; } }