summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2004-07-16 10:59:08 +0000
committerNicholas Clark <nick@ccl4.org>2004-07-16 10:59:08 +0000
commitb0bc38e63ed7e7e448fb07e45ee093d3b3d54be8 (patch)
tree5c9b64c6336adf0565cfabd7cde8ae6c761d9c00 /pod
parent87bdd940c6fd08108ec93f5976066dfb8645f9af (diff)
downloadperl-b0bc38e63ed7e7e448fb07e45ee093d3b3d54be8.tar.gz
Rebuild perlapi.pod
p4raw-id: //depot/perl@23125
Diffstat (limited to 'pod')
-rw-r--r--pod/perlapi.pod44
1 files changed, 23 insertions, 21 deletions
diff --git a/pod/perlapi.pod b/pod/perlapi.pod
index c8f1bfdfdc..512ee440b9 100644
--- a/pod/perlapi.pod
+++ b/pod/perlapi.pod
@@ -507,31 +507,31 @@ Create and return a new interpreter by cloning the current one.
perl_clone takes these flags as parameters:
-CLONEf_COPY_STACKS - is used to, well, copy the stacks also,
-without it we only clone the data and zero the stacks,
-with it we copy the stacks and the new perl interpreter is
-ready to run at the exact same point as the previous one.
-The pseudo-fork code uses COPY_STACKS while the
+CLONEf_COPY_STACKS - is used to, well, copy the stacks also,
+without it we only clone the data and zero the stacks,
+with it we copy the stacks and the new perl interpreter is
+ready to run at the exact same point as the previous one.
+The pseudo-fork code uses COPY_STACKS while the
threads->new doesn't.
CLONEf_KEEP_PTR_TABLE
-perl_clone keeps a ptr_table with the pointer of the old
-variable as a key and the new variable as a value,
-this allows it to check if something has been cloned and not
-clone it again but rather just use the value and increase the
-refcount. If KEEP_PTR_TABLE is not set then perl_clone will kill
-the ptr_table using the function
-C<ptr_table_free(PL_ptr_table); PL_ptr_table = NULL;>,
-reason to keep it around is if you want to dup some of your own
-variable who are outside the graph perl scans, example of this
+perl_clone keeps a ptr_table with the pointer of the old
+variable as a key and the new variable as a value,
+this allows it to check if something has been cloned and not
+clone it again but rather just use the value and increase the
+refcount. If KEEP_PTR_TABLE is not set then perl_clone will kill
+the ptr_table using the function
+C<ptr_table_free(PL_ptr_table); PL_ptr_table = NULL;>,
+reason to keep it around is if you want to dup some of your own
+variable who are outside the graph perl scans, example of this
code is in threads.xs create
CLONEf_CLONE_HOST
-This is a win32 thing, it is ignored on unix, it tells perls
-win32host code (which is c++) to clone itself, this is needed on
-win32 if you want to run two threads at the same time,
-if you just want to do some stuff in a separate perl interpreter
-and then throw it away and return to the original one,
+This is a win32 thing, it is ignored on unix, it tells perls
+win32host code (which is c++) to clone itself, this is needed on
+win32 if you want to run two threads at the same time,
+if you just want to do some stuff in a separate perl interpreter
+and then throw it away and return to the original one,
you don't need to do anything.
PerlInterpreter* perl_clone(PerlInterpreter* interp, UV flags)
@@ -3733,7 +3733,9 @@ Found in file sv.c
Marks an existing SV as mortal. The SV will be destroyed "soon", either
by an explicit call to FREETMPS, or by an implicit call at places such as
-statement boundaries. See also C<sv_newmortal> and C<sv_mortalcopy>.
+statement boundaries. SvTEMP() is turned on which means that the SV's
+string buffer can be "stolen" if this SV is copied. See also C<sv_newmortal>
+and C<sv_mortalcopy>.
SV* sv_2mortal(SV* sv)
@@ -4636,7 +4638,7 @@ Copies a string into a new SV, optionally blessing the SV. The length of the
string must be specified with C<n>. The C<rv> argument will be upgraded to
an RV. That RV will be modified to point to the new SV. The C<classname>
argument indicates the package for the blessing. Set C<classname> to
-C<Nullch> to avoid the blessing. The new SV will have a reference count
+C<Nullch> to avoid the blessing. The new SV will have a reference count
of 1, and the RV will be returned.
Note that C<sv_setref_pv> copies the pointer while this copies the string.