integrate cfgperl changes#6325..6373 into mainline
[p5sagit/p5-mst-13.2.git] / pod / perlguts.pod
index eec6edc..160850c 100644 (file)
@@ -176,7 +176,7 @@ have "magic".  See L<Magic Virtual Tables> later in this document.
 If you know the name of a scalar variable, you can get a pointer to its SV
 by using the following:
 
-    SV*  perl_get_sv("package::varname", FALSE);
+    SV*  get_sv("package::varname", FALSE);
 
 This returns NULL if the variable does not exist.
 
@@ -287,7 +287,7 @@ then nothing is done.
 If you know the name of an array variable, you can get a pointer to its AV
 by using the following:
 
-    AV*  perl_get_av("package::varname", FALSE);
+    AV*  get_av("package::varname", FALSE);
 
 This returns NULL if the variable does not exist.
 
@@ -362,7 +362,7 @@ specified below.
 If you know the name of a hash variable, you can get a pointer to its HV
 by using the following:
 
-    HV*  perl_get_hv("package::varname", FALSE);
+    HV*  get_hv("package::varname", FALSE);
 
 This returns NULL if the variable does not exist.
 
@@ -385,10 +385,10 @@ Beginning with version 5.004, the following functions are also supported:
 
     HE*     hv_fetch_ent  (HV* tb, SV* key, I32 lval, U32 hash);
     HE*     hv_store_ent  (HV* tb, SV* key, SV* val, U32 hash);
-    
+
     bool    hv_exists_ent (HV* tb, SV* key, U32 hash);
     SV*     hv_delete_ent (HV* tb, SV* key, I32 flags, U32 hash);
-    
+
     SV*     hv_iterkeysv  (HE* entry);
 
 Note that these functions take C<SV*> keys, which simplifies writing
@@ -398,14 +398,13 @@ you to stringify the keys (unlike the previous set of functions).
 
 They also return and accept whole hash entries (C<HE*>), making their
 use more efficient (since the hash number for a particular string
-doesn't have to be recomputed every time).  See L<API LISTING> later in
-this document for detailed descriptions.
+doesn't have to be recomputed every time).  See L<perlapi> for detailed
+descriptions.
 
 The following macros must always be used to access the contents of hash
 entries.  Note that the arguments to these macros must be simple
 variables, since they may get evaluated more than once.  See
-L<API LISTING> later in this document for detailed descriptions of these
-macros.
+L<perlapi> for detailed descriptions of these macros.
 
     HePV(HE* he, STRLEN len)
     HeVAL(HE* he)
@@ -535,9 +534,9 @@ to write:
 To create a new Perl variable with an undef value which can be accessed from
 your Perl script, use the following routines, depending on the variable type.
 
-    SV*  perl_get_sv("package::varname", TRUE);
-    AV*  perl_get_av("package::varname", TRUE);
-    HV*  perl_get_hv("package::varname", TRUE);
+    SV*  get_sv("package::varname", TRUE);
+    AV*  get_av("package::varname", TRUE);
+    HV*  get_hv("package::varname", TRUE);
 
 Notice the use of TRUE as the second parameter.  The new variable can now
 be set, using the routines appropriate to the data type.
@@ -710,7 +709,7 @@ following code:
     extern int  dberror;
     extern char *dberror_list;
 
-    SV* sv = perl_get_sv("dberror", TRUE);
+    SV* sv = get_sv("dberror", TRUE);
     sv_setiv(sv, (IV) dberror);
     sv_setpv(sv, dberror_list[dberror]);
     SvIOK_on(sv);
@@ -833,6 +832,8 @@ The current kinds of Magic Virtual Tables are:
     a        vtbl_amagicelem     %OVERLOAD hash element
     c        (none)              Holds overload table (AMT) on stash
     B        vtbl_bm             Boyer-Moore (fast string search)
+    D        vtbl_regdata        Regex match position data (@+ and @- vars)
+    d        vtbl_regdatum       Regex match position data element
     E        vtbl_env            %ENV hash
     e        vtbl_envelem        %ENV hash element
     f        vtbl_fm             Formline ('compiled' format)
@@ -912,7 +913,7 @@ calling these functions, or by using one of the C<sv_set*_mg()> or
 C<sv_cat*_mg()> functions.  Similarly, generic C code must call the
 C<SvGETMAGIC()> macro to invoke any 'get' magic if they use an SV
 obtained from external sources in functions that don't handle magic.
-L<API LISTING> later in this document identifies such functions.
+See L<perlapi> for a description of these functions.
 For example, calls to the C<sv_cat*()> functions typically need to be
 followed by C<SvSETMAGIC()>, but they don't need a prior C<SvGETMAGIC()>
 since their implementation handles 'get' magic.
@@ -1464,13 +1465,13 @@ C<gvsv gvsv add whatever>.
 
 =head2 Compile pass 1: check routines
 
-The tree is created by the I<pseudo-compiler> while yacc code feeds it
-the constructions it recognizes. Since yacc works bottom-up, so does
+The tree is created by the compiler while I<yacc> code feeds it
+the constructions it recognizes. Since I<yacc> works bottom-up, so does
 the first pass of perl compilation.
 
 What makes this pass interesting for perl developers is that some
 optimization may be performed on this pass.  This is optimization by
-so-called I<check routines>.  The correspondence between node names
+so-called "check routines".  The correspondence between node names
 and corresponding check routines is described in F<opcode.pl> (do not
 forget to run C<make regen_headers> if you modify this file).
 
@@ -1524,9 +1525,6 @@ are subject to the same restrictions as in the pass 2.
 
 =head1 How multiple interpreters and concurrency are supported
 
-WARNING: This information is subject to radical changes prior to
-the Perl 5.6 release.  Use with caution.
-
 =head2 Background and PERL_IMPLICIT_CONTEXT
 
 The Perl interpreter can be regarded as a closed box: it has an API
@@ -1560,8 +1558,8 @@ which will be private.  All functions whose names begin C<S_> are private
 "Perl_", but just because a function begins with "Perl_" does not mean it is
 part of the API. The easiest way to be B<sure> a function is part of the API
 is to find its entry in L<perlapi>.  If it exists in L<perlapi>, it's part
-of the API.  If it doesn't, and you think it should be (i.e., you need it fo
-r your extension), send mail via L<perlbug> explaining why you think it
+of the API.  If it doesn't, and you think it should be (i.e., you need it for
+your extension), send mail via L<perlbug> explaining why you think it
 should be.
 
 (L<perlapi> itself is generated by embed.pl, a Perl script that generates
@@ -1669,17 +1667,17 @@ Thus, something like:
 
         sv_setsv(asv, bsv);
 
-in your extesion will translate to this when PERL_IMPLICIT_CONTEXT is
+in your extension will translate to this when PERL_IMPLICIT_CONTEXT is
 in effect:
 
-        Perl_sv_setsv(GetPerlInterpreter(), asv, bsv);
+        Perl_sv_setsv(Perl_get_context(), asv, bsv);
 
 or to this otherwise:
 
         Perl_sv_setsv(asv, bsv);
 
 You have to do nothing new in your extension to get this; since
-the Perl library provides GetPerlInterpreter(), it will all just
+the Perl library provides Perl_get_context(), it will all just
 work.
 
 The second, more efficient way is to use the following template for