develooper Front page | perl.perl5.porters | Postings from January 2003

S_utf8_mg_pos et. al.

Thread Next
Nick Ing-Simmons
January 26, 2003 10:32
S_utf8_mg_pos et. al.
Message ID:

VC++ is complaining about a signed/unsigned compare in a few spots 
in sv.c 1st instance is:

S_utf8_mg_pos(pTHX_ SV *sv, MAGIC **mgp, STRLEN **cachep, I32 i, I32 *offsetp, I32 uoff, U8 **sp, U8 *start, U8 *send)
    bool found = FALSE;

    if (SvMAGICAL(sv) && !SvREADONLY(sv)) {
	if (!*mgp)
	    *mgp = mg_find(sv, PERL_MAGIC_utf8);
	if (*mgp && (*mgp)->mg_ptr) {
	    *cachep = (STRLEN *) (*mgp)->mg_ptr;
	    if ((*cachep)[i] == uoff)	/* An exact match. */

That is a STRLEN vs I32 compare - can one becomre the other?

Nick Ing-Simmons

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About