From 61b16eb90f32a2433d6de43e477a03b8d9fed039 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Thu, 3 Sep 2015 22:30:56 -0600 Subject: [PATCH] perlapi: Add some S<> so that these constructs appear on a single output line for reader convenience. --- av.c | 14 +++++++------- mg.c | 2 +- op.c | 4 ++-- pad.c | 2 +- sv.c | 6 +++--- utf8.h | 6 +++--- util.h | 4 ++-- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/av.c b/av.c index 07a509e..cb99ceb 100644 --- a/av.c +++ b/av.c @@ -649,7 +649,7 @@ Unshift the given number of C values onto the beginning of the array. The array will grow automatically to accommodate the addition. You must then use C to assign values to these new elements. -Perl equivalent: C +Perl equivalent: S> =cut */ @@ -752,7 +752,7 @@ Perl_av_shift(pTHX_ AV *av) =for apidoc av_top_index Returns the highest index in the array. The number of elements in the -array is C. Returns -1 if the array is empty. +array is S>. Returns -1 if the array is empty. The Perl equivalent for this is C<$#myarray>. @@ -780,12 +780,12 @@ Perl_av_len(pTHX_ AV *av) =for apidoc av_fill Set the highest index in the array to the given number, equivalent to -Perl's C<$#array = $fill;>. +Perl's S>. -The number of elements in the array will be C after +The number of elements in the array will be S> after C returns. If the array was previously shorter, then the additional elements appended are set to NULL. If the array -was longer, then the excess elements are freed. C is +was longer, then the excess elements are freed. S> is the same as C. =cut @@ -835,8 +835,8 @@ Perl_av_fill(pTHX_ AV *av, SSize_t fill) Deletes the element indexed by C from the array, makes the element mortal, and returns it. If C equals C, the element is freed and null -is returned. Perl equivalent: C for the -non-C version and a void-context C for the +is returned. Perl equivalent: S> for the +non-C version and a void-context S> for the C version. =cut diff --git a/mg.c b/mg.c index 7e7b112..1859391 100644 --- a/mg.c +++ b/mg.c @@ -491,7 +491,7 @@ gets copied, value magic doesn't (eg C, C). If C is false then no set magic will be called on the new (empty) SV. -This typically means that assignment will soon follow (e.g. C<'local $x = $y'>), +This typically means that assignment will soon follow (e.g. S>), and that will handle the magic. =cut diff --git a/op.c b/op.c index 08788ce..72c6809 100644 --- a/op.c +++ b/op.c @@ -8800,7 +8800,7 @@ Perl_newCONSTSUB(pTHX_ HV *stash, const char *name, SV *sv) /* =for apidoc newCONSTSUB_flags -Creates a constant sub equivalent to Perl C which is +Creates a constant sub equivalent to Perl S> which is eligible for inlining at compile-time. Currently, the only useful value for C is C. @@ -8808,7 +8808,7 @@ Currently, the only useful value for C is C. The newly created subroutine takes ownership of a reference to the passed in SV. -Passing C for SV creates a constant sub equivalent to C, +Passing C for SV creates a constant sub equivalent to S>, which won't be called if used as a destructor, but will suppress the overhead of a call to C. (This form, however, isn't eligible for inlining at compile time.) diff --git a/pad.c b/pad.c index e34faec..9bb8cfe 100644 --- a/pad.c +++ b/pad.c @@ -64,7 +64,7 @@ have C<&PL_padname_const> "names" (see C>). That C<&PL_padname_undef> and C<&PL_padname_const> are used is an implementation detail subject to change. To test for them, use C and -C, respectively. +S>, respectively. Only C/C variable slots get valid names. The rest are op targets/GVs/constants which are statically allocated diff --git a/sv.c b/sv.c index bcb031a..f2908e0 100644 --- a/sv.c +++ b/sv.c @@ -4983,8 +4983,8 @@ so that pointer should not be freed or used by the programmer after giving it to C, and neither should any pointers from "behind" that pointer (e.g. ptr + 1) be used. -If C is true, will call C. If -C is true, then C must be C, +If S> is true, will call C. If +S & SV_HAS_TRAILING_NUL>> is true, then C must be C, and the realloc will be skipped (i.e. the buffer is actually at least 1 byte longer than C, and already meets the requirements for storing in C). @@ -7630,7 +7630,7 @@ S_assert_uft8_cache_coherent(pTHX_ const char *const func, STRLEN from_cache, =for apidoc sv_eq Returns a boolean indicating whether the strings in the two SVs are -identical. Is UTF-8 and C<'use bytes'> aware, handles get magic, and will +identical. Is UTF-8 and S> aware, handles get magic, and will coerce its args to strings if necessary. =for apidoc sv_eq_flags diff --git a/utf8.h b/utf8.h index 8355d0a..2e1aa02 100644 --- a/utf8.h +++ b/utf8.h @@ -697,9 +697,9 @@ case any call to string overloading updates the internal UTF-8 encoding flag. =for apidoc Am|STRLEN|isUTF8_CHAR|const U8 *s|const U8 *e Returns the number of bytes beginning at C which form a legal UTF-8 (or -UTF-EBCDIC) encoded character, looking no further than C bytes into -C. Returns 0 if the sequence starting at C through C is not -well-formed UTF-8 +UTF-EBCDIC) encoded character, looking no further than S> bytes into +C. Returns 0 if the sequence starting at C through S> is not +well-formed UTF-8. Note that an INVARIANT character (i.e. ASCII on non-EBCDIC machines) is a valid UTF-8 character. diff --git a/util.h b/util.h index 0d41ebc..3310b11 100644 --- a/util.h +++ b/util.h @@ -43,11 +43,11 @@ =for apidoc ibcmp -This is a synonym for (! foldEQ()) +This is a synonym for S> =for apidoc ibcmp_locale -This is a synonym for (! foldEQ_locale()) +This is a synonym for S> =cut */ -- 1.8.3.1