This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perlapi: Add clarification for SvGROW()
[perl5.git] / sv.h
diff --git a/sv.h b/sv.h
index e311ff2..6227d46 100644 (file)
--- a/sv.h
+++ b/sv.h
@@ -2013,6 +2013,9 @@ Returns a pointer to the character
 buffer.  SV must be of type >= C<SVt_PV>.  One
 alternative is to call C<sv_grow> if you are not sure of the type of SV.
 
 buffer.  SV must be of type >= C<SVt_PV>.  One
 alternative is to call C<sv_grow> if you are not sure of the type of SV.
 
+You might mistakenly think that C<len> is the number of bytes to add to the
+existing size, but instead it is the total size C<sv> should be.
+
 =for apidoc Am|char *|SvPVCLEAR|SV* sv
 Ensures that sv is a SVt_PV and that its SvCUR is 0, and that it is
 properly null terminated. Equivalent to sv_setpvs(""), but more efficient.
 =for apidoc Am|char *|SvPVCLEAR|SV* sv
 Ensures that sv is a SVt_PV and that its SvCUR is 0, and that it is
 properly null terminated. Equivalent to sv_setpvs(""), but more efficient.