summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-10-31 13:49:26 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-10-31 13:49:26 +0000
commit1d51329b7b2db5dad38362dae2635cd5f623f6a3 (patch)
tree536b49cbb6c98fb034ff58dba5df65fc009e32d0
parente3f73d4edc1b72464d0a94ac202f6e1bd3daf149 (diff)
downloadperl-1d51329b7b2db5dad38362dae2635cd5f623f6a3.tar.gz
Make S_readpipe_override() compile with threads; regenerate perlapi.pod
p4raw-id: //depot/perl@29169
-rw-r--r--embed.fnc1
-rw-r--r--embed.h2
-rw-r--r--pod/perlapi.pod12
-rw-r--r--proto.h1
-rw-r--r--toke.c6
5 files changed, 16 insertions, 6 deletions
diff --git a/embed.fnc b/embed.fnc
index d3a1e27646..819bf4398e 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1453,6 +1453,7 @@ s |char* |force_word |NN char *start|int token|int check_keyword \
|int allow_pack|int allow_tick
s |SV* |tokeq |NN SV *sv
s |int |pending_ident
+s |void |readpipe_override|
sR |char* |scan_const |NN char *start
sR |char* |scan_formline |NN char *s
sR |char* |scan_heredoc |NN char *s
diff --git a/embed.h b/embed.h
index e6b1af3100..9241cc651d 100644
--- a/embed.h
+++ b/embed.h
@@ -1459,6 +1459,7 @@
#define force_word S_force_word
#define tokeq S_tokeq
#define pending_ident S_pending_ident
+#define readpipe_override S_readpipe_override
#define scan_const S_scan_const
#define scan_formline S_scan_formline
#define scan_heredoc S_scan_heredoc
@@ -3663,6 +3664,7 @@
#define force_word(a,b,c,d,e) S_force_word(aTHX_ a,b,c,d,e)
#define tokeq(a) S_tokeq(aTHX_ a)
#define pending_ident() S_pending_ident(aTHX)
+#define readpipe_override() S_readpipe_override(aTHX)
#define scan_const(a) S_scan_const(aTHX_ a)
#define scan_formline(a) S_scan_formline(aTHX_ a)
#define scan_heredoc(a) S_scan_heredoc(aTHX_ a)
diff --git a/pod/perlapi.pod b/pod/perlapi.pod
index 64bb6b8b49..3ea050e943 100644
--- a/pod/perlapi.pod
+++ b/pod/perlapi.pod
@@ -188,9 +188,15 @@ Found in file av.c
=item av_fill
X<av_fill>
-Ensure than an array has a given number of elements, equivalent to
+Set the highest index in the array to the given number, equivalent to
Perl's C<$#array = $fill;>.
+The number of elements in the an array will be C<fill + 1> after
+av_fill() returns. If the array was previously shorter then the
+additional elements appended are set to C<PL_sv_undef>. If the array
+was longer, then the excess elements are freed. C<av_fill(av, -1)> is
+the same as C<av_clear(av)>.
+
void av_fill(AV* ar, I32 fill)
=for hackers
@@ -199,8 +205,8 @@ Found in file av.c
=item av_len
X<av_len>
-Returns the highest index in the array. Returns -1 if the array is
-empty.
+Returns the highest index in the array. The number of elements in the
+array is C<av_len(av) + 1>. Returns -1 if the array is empty.
I32 av_len(const AV* ar)
diff --git a/proto.h b/proto.h
index 951ee4d74e..2e75d902ed 100644
--- a/proto.h
+++ b/proto.h
@@ -3919,6 +3919,7 @@ STATIC SV* S_tokeq(pTHX_ SV *sv)
__attribute__nonnull__(pTHX_1);
STATIC int S_pending_ident(pTHX);
+STATIC void S_readpipe_override(pTHX);
STATIC char* S_scan_const(pTHX_ char *start)
__attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
diff --git a/toke.c b/toke.c
index 40b5465066..dcc00509ab 100644
--- a/toke.c
+++ b/toke.c
@@ -2854,7 +2854,7 @@ S_find_in_my_stash(pTHX_ const char *pkgname, I32 len)
* optree, provided sublex_start() is called afterwards.
*/
STATIC void
-S_readpipe_override()
+S_readpipe_override(pTHX)
{
GV **gvp;
GV *gv_readpipe = gv_fetchpvs("readpipe", GV_NOTQUAL, SVt_PVCV);
@@ -4987,7 +4987,7 @@ Perl_yylex(pTHX)
no_op("Backticks",s);
if (!s)
missingterm(NULL);
- S_readpipe_override();
+ readpipe_override(aTHX);
TERM(sublex_start());
case '\\':
@@ -6306,7 +6306,7 @@ Perl_yylex(pTHX)
s = scan_str(s,!!PL_madskills,FALSE);
if (!s)
missingterm(NULL);
- S_readpipe_override();
+ readpipe_override(aTHX);
TERM(sublex_start());
case KEY_return: