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

Need help with threads::shared code issue

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

 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

    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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About