From: Craig A. Berry Date: Sat, 16 Jan 2010 22:15:47 +0000 (-0600) Subject: A fig leaf for calling sv_pos_u2b with IV* where it expects I32*. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=596f450b74e963069b08e852c2f88cad7d3ef2e6;p=p5sagit%2Fp5-mst-13.2.git A fig leaf for calling sv_pos_u2b with IV* where it expects I32*. Following v5.11.3-103-gb6d1426, any compiler paying attention whines about the pointer mismatch (which on VMS breaks the build). Zefram reports a further patch in progress: Message-ID: <20100116022631.GA10264@fysh.org> but this gets the warning out of the way so other work can proceed. --- diff --git a/pp.c b/pp.c index 4735c94..089401b 100644 --- a/pp.c +++ b/pp.c @@ -3169,8 +3169,11 @@ PP(pp_substr) else { const IV upos = pos; const IV urem = rem; + /* FIXME -- if an IV is longer than an I32, we're truncating here, + * but a 64-bit version of sv_pos_u2b is not (yet) available. + */ if (utf8_curlen) - sv_pos_u2b(sv, &pos, &rem); + sv_pos_u2b(sv, (I32 *)&pos, (I32 *)&rem); tmps += pos; /* we either return a PV or an LV. If the TARG hasn't been used * before, or is of that type, reuse it; otherwise use a mortal