This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix a few places that said 'int', but meant 'STRLEN'
authorGurusamy Sarathy <gsar@cpan.org>
Thu, 25 Mar 1999 06:11:46 +0000 (06:11 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Thu, 25 Mar 1999 06:11:46 +0000 (06:11 +0000)
p4raw-id: //depot/perl@3162

pod/perlguts.pod
proto.h
sv.c

index 28adb36..c5289a1 100644 (file)
@@ -151,7 +151,7 @@ If you want to append something to the end of string stored in an C<SV*>,
 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<classname> is non-null.
 Copies string into an SV whose reference is C<rv>.  Set length to 0 to let
 Perl calculate the string length.  SV is blessed if C<classname> 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<private> setting.  Use C<SvPOK>.
 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 <SvPV> 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 (file)
--- 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 (file)
--- 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;