develooper Front page | perl.perl5.porters | Postings from February 2008

Need help with threads::shared code issue

Thread Next
From:
Jerry D. Hedden
Date:
February 11, 2008 08:18
Subject:
Need help with threads::shared code issue
Message ID:
1ff86f510802110817l46c75860s1bae223e44a33235@mail.gmail.com
Change 33256 fixed the prototype for mg_copy.  In shared.xs
(part of threads::shared), this changed the following:

 int
 sharedsv_array_mg_copy(pTHX_ SV *sv, MAGIC* mg,
-                       SV *nsv, const char *name, int namlen)
+                       SV *nsv, const char *name, I32 namlen)
 {

With this change, building on another version of Perl
produces:

    shared.xs:1063: warning: initialization from incompatible pointer type

For 32-bit machines, this should not cause problems.
However, I believe that if I put this change out on CPAN
it will cause breakage on 64-bit machines.  Is this correct?

I assume this code will eventually get propagated down to
5.10.x and maybe 5.8.9.  How can this change be conditionally
incorporated in the code to work on any Perl version and on
both 32-bit and 64-bit machines?

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About