From: Gurusamy Sarathy Date: Thu, 25 Mar 1999 06:11:46 +0000 (+0000) Subject: fix a few places that said 'int', but meant 'STRLEN' X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e65f3abd032ddf0ce2aad5a08fddd39ba3e1e377;p=p5sagit%2Fp5-mst-13.2.git fix a few places that said 'int', but meant 'STRLEN' p4raw-id: //depot/perl@3162 --- diff --git a/pod/perlguts.pod b/pod/perlguts.pod index 28adb36..c5289a1 100644 --- a/pod/perlguts.pod +++ b/pod/perlguts.pod @@ -151,7 +151,7 @@ If you want to append something to the end of string stored in an C, you can use the following functions: void sv_catpv(SV*, const char*); - void sv_catpvn(SV*, const char*, int); + void sv_catpvn(SV*, const char*, STRLEN); void sv_catpvf(SV*, const char*, ...); void sv_catpvfn(SV*, const char*, STRLEN, va_list *, SV **, I32, bool); void sv_catsv(SV*, SV*); @@ -503,7 +503,7 @@ reference is rv. SV is blessed if C is non-null. Copies string into an SV whose reference is C. Set length to 0 to let Perl calculate the string length. SV is blessed if C is non-null. - SV* sv_setref_pvn(SV* rv, const char* classname, PV iv, int length); + SV* sv_setref_pvn(SV* rv, const char* classname, PV iv, STRLEN length); Tests whether the SV is blessed into the specified class. It does not check inheritance relationships. @@ -3032,21 +3032,21 @@ Checks the B setting. Use C. Returns a pointer to the string in the SV, or a stringified form of the SV if the SV does not contain a string. Handles 'get' magic. - char* SvPV (SV* sv, int len) + char* SvPV (SV* sv, STRLEN len) =item SvPV_force Like but will force the SV into becoming a string (SvPOK). You want force if you are going to update the SvPVX directly. - char* SvPV_force(SV* sv, int len) + char* SvPV_force(SV* sv, STRLEN len) =item SvPV_nolen Returns a pointer to the string in the SV, or a stringified form of the SV if the SV does not contain a string. Handles 'get' magic. - char* SvPV (SV* sv) + char* SvPV_nolen (SV* sv) =item SvPVX diff --git a/proto.h b/proto.h index e2ea784..b809ea0 100644 --- a/proto.h +++ b/proto.h @@ -617,7 +617,7 @@ VIRTUAL void sv_setnv _((SV* sv, double num)); VIRTUAL SV* sv_setref_iv _((SV* rv, const char* classname, IV iv)); VIRTUAL SV* sv_setref_nv _((SV* rv, const char* classname, double nv)); VIRTUAL SV* sv_setref_pv _((SV* rv, const char* classname, void* pv)); -VIRTUAL SV* sv_setref_pvn _((SV* rv, const char* classname, char* pv, I32 n)); +VIRTUAL SV* sv_setref_pvn _((SV* rv, const char* classname, char* pv, STRLEN n)); VIRTUAL void sv_setpv _((SV* sv, const char* ptr)); VIRTUAL void sv_setpvn _((SV* sv, const char* ptr, STRLEN len)); VIRTUAL void sv_setsv _((SV* dsv, SV* ssv)); diff --git a/sv.c b/sv.c index 350b053..6310937 100644 --- a/sv.c +++ b/sv.c @@ -4178,7 +4178,7 @@ sv_setref_nv(SV *rv, const char *classname, double nv) } SV* -sv_setref_pvn(SV *rv, const char *classname, char *pv, I32 n) +sv_setref_pvn(SV *rv, const char *classname, char *pv, STRLEN n) { sv_setpvn(newSVrv(rv,classname), pv, n); return rv;