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

Re: Change 33256: [PATCH] mg_copy ought to take an I32

From:
Jerry D. Hedden
Date:
February 8, 2008 08:32
Subject:
Re: Change 33256: [PATCH] mg_copy ought to take an I32
Message ID:
1ff86f510802080831w71d78e89ufb87498a965ea09@mail.gmail.com
How do I fit this change into the CPAN version of threads::shared?
When I add the change, and build with another version of Perl, I get:

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

I think it needs to be conditionalize because of
32-bit/64-bit issues?  Can it be done by Perl version, or
will this change get propagated to 5.10.x and maybe 5.8.9?
What's the best way to do that?

> Change 33256 by rgs@stcosmo on 2008/02/08 15:18:45
>
>         Subject: [PATCH] mg_copy ought to take an I32
>         From: "Vincent Pit" <perl@profvince.com>
>         Date: Wed, 6 Feb 2008 10:39:58 +0100 (CET)
>         Message-ID: <39468.147.210.17.175.1202290798.squirrel@147.210.17.175>
>
> Affected files ...
>
> ... //depot/perl/ext/threads/shared/shared.xs#69 edit
> ... //depot/perl/mg.h#31 edit
> ... //depot/perl/pod/perlguts.pod#148 edit
>
> Differences ...
>
> ==== //depot/perl/ext/threads/shared/shared.xs#69 (text) ====
> Index: perl/ext/threads/shared/shared.xs
> --- perl/ext/threads/shared/shared.xs#68~32658~ 2007-12-19 09:17:45.000000000 -0800
> +++ perl/ext/threads/shared/shared.xs   2008-02-08 07:18:45.000000000 -0800
> @@ -1035,7 +1035,7 @@
>   */
>  int
>  sharedsv_array_mg_copy(pTHX_ SV *sv, MAGIC* mg,
> -                       SV *nsv, const char *name, int namlen)
> +                       SV *nsv, const char *name, I32 namlen)
>  {
>      MAGIC *nmg = sv_magicext(nsv,mg->mg_obj,
>                              toLOWER(mg->mg_type),&sharedsv_elem_vtbl,
>
> ==== //depot/perl/mg.h#31 (text) ====
> Index: perl/mg.h
> --- perl/mg.h#30~32793~ 2008-01-01 09:18:13.000000000 -0800
> +++ perl/mg.h   2008-02-08 07:18:45.000000000 -0800
> @@ -18,7 +18,7 @@
>      int                (CPERLscope(*svt_clear))(pTHX_ SV *sv, MAGIC* mg);
>      int                (CPERLscope(*svt_free)) (pTHX_ SV *sv, MAGIC* mg);
>      int                (CPERLscope(*svt_copy)) (pTHX_ SV *sv, MAGIC* mg,
> -                                       SV *nsv, const char *name, int namlen);
> +                                       SV *nsv, const char *name, I32 namlen);
>      int                (CPERLscope(*svt_dup))  (pTHX_ MAGIC *mg, CLONE_PARAMS *param);
>      int                (CPERLscope(*svt_local))(pTHX_ SV *nsv, MAGIC *mg);
>  };
>
> ==== //depot/perl/pod/perlguts.pod#148 (text) ====
> Index: perl/pod/perlguts.pod
> --- perl/pod/perlguts.pod#147~32255~    2007-11-09 13:28:25.000000000 -0800
> +++ perl/pod/perlguts.pod       2008-02-08 07:18:45.000000000 -0800
> @@ -979,7 +979,7 @@
>      int  (*svt_clear)(SV* sv, MAGIC* mg);
>      int  (*svt_free)(SV* sv, MAGIC* mg);
>
> -    int  (*svt_copy)(SV *sv, MAGIC* mg, SV *nsv, const char *name, int namlen);
> +    int  (*svt_copy)(SV *sv, MAGIC* mg, SV *nsv, const char *name, I32 namlen);
>      int  (*svt_dup)(MAGIC *mg, CLONE_PARAMS *param);
>      int  (*svt_local)(SV *nsv, MAGIC *mg);
>
> End of Patch.
>



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