diff options
Diffstat (limited to 'pod')
-rw-r--r-- | pod/perlapi.pod | 23 | ||||
-rw-r--r-- | pod/perlembed.pod | 8 |
2 files changed, 12 insertions, 19 deletions
diff --git a/pod/perlapi.pod b/pod/perlapi.pod index 6e53740401..933b2aa99e 100644 --- a/pod/perlapi.pod +++ b/pod/perlapi.pod @@ -3474,26 +3474,19 @@ SV is B<not> incremented. =for hackers Found in file sv.c -=item NEWSV -X<NEWSV> +=item newSV +X<newSV> Creates a new SV. A non-zero C<len> parameter indicates the number of bytes of preallocated string space the SV should have. An extra byte for a -tailing NUL is also reserved. (SvPOK is not set for the SV even if string +trailing NUL is also reserved. (SvPOK is not set for the SV even if string space is allocated.) The reference count for the new SV is set to 1. -C<id> is an integer id between 0 and 1299 (used to identify leaks). - - SV* NEWSV(int id, STRLEN len) - -=for hackers -Found in file handy.h - -=item newSV -X<newSV> -Create a new null SV, or if len > 0, create a new empty SVt_PV type SV -with an initial PV allocation of len+1. Normally accessed via the C<NEWSV> -macro. +In 5.9.3, newSV() replaces the older NEWSV() API, and drops the first +parameter, I<x>, a debug aid which allowed callers to identify themselves. +This aid has been superseded by a new build option, PERL_MEM_LOG (see +L<perlhack/PERL_MEM_LOG>). The older API is still there for use in XS +modules supporting older perls. SV* newSV(STRLEN len) diff --git a/pod/perlembed.pod b/pod/perlembed.pod index 0bd569fafb..9523e1f5ab 100644 --- a/pod/perlembed.pod +++ b/pod/perlembed.pod @@ -430,7 +430,7 @@ been wrapped here): I32 match(SV *string, char *pattern) { - SV *command = NEWSV(1099, 0), *retval; + SV *command = newSV(0), *retval; STRLEN n_a; sv_setpvf(command, "my $string = '%s'; $string =~ %s", @@ -452,7 +452,7 @@ been wrapped here): I32 substitute(SV **string, char *pattern) { - SV *command = NEWSV(1099, 0), *retval; + SV *command = newSV(0), *retval; STRLEN n_a; sv_setpvf(command, "$string = '%s'; ($string =~ %s)", @@ -475,7 +475,7 @@ been wrapped here): I32 matches(SV *string, char *pattern, AV **match_list) { - SV *command = NEWSV(1099, 0); + SV *command = newSV(0); I32 num_matches; STRLEN n_a; @@ -505,7 +505,7 @@ been wrapped here): perl_parse(my_perl, NULL, 3, embedding, NULL); PL_exit_flags |= PERL_EXIT_DESTRUCT_END; - text = NEWSV(1099,0); + text = newSV(0); sv_setpv(text, "When he is at a convenience store and the " "bill comes to some amount like 76 cents, Maynard is " "aware that there is something he *should* do, something " |