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

S_utf8_mg_pos et. al.

Thread Next
From:
Nick Ing-Simmons
Date:
January 26, 2003 10:32
Subject:
S_utf8_mg_pos et. al.
Message ID:
20030126183155.1859.12@bactrian.ni-s.u-net.com

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

STATIC bool
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
http://www.ni-s.u-net.com/


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