In perl.git, the branch smoke-me/bulk88/rt125296-wip-CopFILE-on-threads has 
been updated

<http://perl5.git.perl.org/perl.git/commitdiff/9108ccb66ee7b8c6221bd21a508782a352c4601f?hp=724a0e22206e18fa3d8d1f0bf57c541c146676b5>

- Log -----------------------------------------------------------------
commit 9108ccb66ee7b8c6221bd21a508782a352c4601f
Author: Daniel Dragan <[email protected]>
Date:   Sat Feb 20 14:29:38 2016 -0500

    squash to "WIP add API for refcounting CopFILE names with threads"
    
    George smoker fixes
-----------------------------------------------------------------------

Summary of changes:
 hv.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/hv.c b/hv.c
index cf1aabc..1386e19 100644
--- a/hv.c
+++ b/hv.c
@@ -76,10 +76,12 @@ S_new_he(pTHX)
 char *
 Perl_newchek(pTHX_ const char *str, I32 len)
 {
+    dVAR;
     HEK * hek;
     U32 hash;
     char * buf;
     PERL_ARGS_ASSERT_NEWCHEK;
+
     if(!len)
        len = strlen(str);
     len +=2;
@@ -90,7 +92,7 @@ Perl_newchek(pTHX_ const char *str, I32 len)
     memcpy(&buf[2], str, len-2);
     PERL_HASH(hash, buf, len);
     hek = save_hek_flags(buf, len, hash, HVhek_COMPILING);
-    return (char*)&HEK_KEY(hek)+2;
+    return HEK2FNPV(hek);
 }
 #endif
 
@@ -146,7 +148,7 @@ Perl_free_copfile(pTHX_ COP * cop)
 void
 Perl_restore_copfile(pTHX_ void * idx)
 {
-    SSCHEK* ssent = SSPTRt(INT2PTR(I32,idx), SSCHEK);
+    SSCHEK* ssent = SSPTRt((Size_t)idx, SSCHEK);
     if(*ssent->where != CHEK2FNPV(ssent->what)) {
        CHEK * existing = FNPV2CHEK(*ssent->where);
        *ssent->where = CHEK2FNPV(ssent->what);
@@ -168,7 +170,7 @@ Perl_save_copfile(pTHX_ COP * cop)
     PERL_ARGS_ASSERT_SAVE_COPFILE;
     ssent->what = old;
     ssent->where = &CopFILE(cop);
-    SAVEDESTRUCTOR_X(Perl_restore_copfile,(void*)idx);
+    SAVEDESTRUCTOR_X(Perl_restore_copfile,(void*)(Size_t)idx);
     chek_inc(old);
 }
 

--
Perl5 Master Repository

Reply via email to