This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fold together the IO and IO::Select perldelta entries
[perl5.git] / cop.h
diff --git a/cop.h b/cop.h
index 970aa8d..ad0ee9b 100644 (file)
--- a/cop.h
+++ b/cop.h
@@ -92,8 +92,9 @@ typedef struct jmpenv JMPENV;
  * 
  * The original patches that introduces flexible exceptions were:
  *
- *   http://public.activestate.com/cgi-bin/perlbrowse?patch=3386
- *   http://public.activestate.com/cgi-bin/perlbrowse?patch=5162
+ * http://perl5.git.perl.org/perl.git/commit/312caa8e97f1c7ee342a9895c2f0e749625b4929
+ * http://perl5.git.perl.org/perl.git/commit/14dd3ad8c9bf82cf09798a22cc89a9862dfd6d1a                                        
+ *  
  */
 
 #define dJMPENV                JMPENV cur_env
@@ -161,7 +162,7 @@ typedef struct refcounted_he COPHH;
 #define COPHH_KEY_UTF8 REFCOUNTED_HE_KEY_UTF8
 
 /*
-=for apidoc Am|SV *|cophh_fetch_pvn|const COPHH *cophh|const char *keypv|STRLEN keylen|U32 hash|U32 flags
+=for apidoc Amx|SV *|cophh_fetch_pvn|const COPHH *cophh|const char *keypv|STRLEN keylen|U32 hash|U32 flags
 
 Look up the entry in the cop hints hash I<cophh> with the key specified by
 I<keypv> and I<keylen>.  If I<flags> has the C<COPHH_KEY_UTF8> bit set,
@@ -178,7 +179,7 @@ associated with the key.
     Perl_refcounted_he_fetch_pvn(aTHX_ cophh, keypv, keylen, hash, flags)
 
 /*
-=for apidoc Am|SV *|cophh_fetch_pvs|const COPHH *cophh|const char *key|U32 flags
+=for apidoc Amx|SV *|cophh_fetch_pvs|const COPHH *cophh|const char *key|U32 flags
 
 Like L</cophh_fetch_pvn>, but takes a literal string instead of a
 string/length pair, and no precomputed hash.
@@ -190,7 +191,7 @@ string/length pair, and no precomputed hash.
     Perl_refcounted_he_fetch_pvn(aTHX_ cophh, STR_WITH_LEN(key), 0, flags)
 
 /*
-=for apidoc Am|SV *|cophh_fetch_pv|const COPHH *cophh|const char *key|U32 hash|U32 flags
+=for apidoc Amx|SV *|cophh_fetch_pv|const COPHH *cophh|const char *key|U32 hash|U32 flags
 
 Like L</cophh_fetch_pvn>, but takes a nul-terminated string instead of
 a string/length pair.
@@ -202,7 +203,7 @@ a string/length pair.
     Perl_refcounted_he_fetch_pv(aTHX_ cophh, key, hash, flags)
 
 /*
-=for apidoc Am|SV *|cophh_fetch_sv|const COPHH *cophh|SV *key|U32 hash|U32 flags
+=for apidoc Amx|SV *|cophh_fetch_sv|const COPHH *cophh|SV *key|U32 hash|U32 flags
 
 Like L</cophh_fetch_pvn>, but takes a Perl scalar instead of a
 string/length pair.
@@ -214,7 +215,7 @@ string/length pair.
     Perl_refcounted_he_fetch_sv(aTHX_ cophh, key, hash, flags)
 
 /*
-=for apidoc Am|HV *|cophh_2hv|const COPHH *cophh|U32 flags
+=for apidoc Amx|HV *|cophh_2hv|const COPHH *cophh|U32 flags
 
 Generates and returns a standard Perl hash representing the full set of
 key/value pairs in the cop hints hash I<cophh>.  I<flags> is currently
@@ -227,7 +228,7 @@ unused and must be zero.
     Perl_refcounted_he_chain_2hv(aTHX_ cophh, flags)
 
 /*
-=for apidoc Am|COPHH *|cophh_copy|COPHH *cophh
+=for apidoc Amx|COPHH *|cophh_copy|COPHH *cophh
 
 Make and return a complete copy of the cop hints hash I<cophh>.
 
@@ -237,7 +238,7 @@ Make and return a complete copy of the cop hints hash I<cophh>.
 #define cophh_copy(cophh) Perl_refcounted_he_inc(aTHX_ cophh)
 
 /*
-=for apidoc Am|void|cophh_free|COPHH *cophh
+=for apidoc Amx|void|cophh_free|COPHH *cophh
 
 Discard the cop hints hash I<cophh>, freeing all resources associated
 with it.
@@ -248,7 +249,7 @@ with it.
 #define cophh_free(cophh) Perl_refcounted_he_free(aTHX_ cophh)
 
 /*
-=for apidoc Am|COPHH *|cophh_new_empty
+=for apidoc Amx|COPHH *|cophh_new_empty
 
 Generate and return a fresh cop hints hash containing no entries.
 
@@ -258,7 +259,7 @@ Generate and return a fresh cop hints hash containing no entries.
 #define cophh_new_empty() ((COPHH *)NULL)
 
 /*
-=for apidoc Am|COPHH *|cophh_store_pvn|COPHH *cophh|const char *keypv|STRLEN keylen|U32 hash|SV *value|U32 flags
+=for apidoc Amx|COPHH *|cophh_store_pvn|COPHH *cophh|const char *keypv|STRLEN keylen|U32 hash|SV *value|U32 flags
 
 Stores a value, associated with a key, in the cop hints hash I<cophh>,
 and returns the modified hash.  The returned hash pointer is in general
@@ -284,7 +285,7 @@ be stored with referential integrity, but will be coerced to strings.
     Perl_refcounted_he_new_pvn(aTHX_ cophh, keypv, keylen, hash, value, flags)
 
 /*
-=for apidoc Am|COPHH *|cophh_store_pvs|const COPHH *cophh|const char *key|SV *value|U32 flags
+=for apidoc Amx|COPHH *|cophh_store_pvs|const COPHH *cophh|const char *key|SV *value|U32 flags
 
 Like L</cophh_store_pvn>, but takes a literal string instead of a
 string/length pair, and no precomputed hash.
@@ -296,7 +297,7 @@ string/length pair, and no precomputed hash.
     Perl_refcounted_he_new_pvn(aTHX_ cophh, STR_WITH_LEN(key), 0, value, flags)
 
 /*
-=for apidoc Am|COPHH *|cophh_store_pv|const COPHH *cophh|const char *key|U32 hash|SV *value|U32 flags
+=for apidoc Amx|COPHH *|cophh_store_pv|const COPHH *cophh|const char *key|U32 hash|SV *value|U32 flags
 
 Like L</cophh_store_pvn>, but takes a nul-terminated string instead of
 a string/length pair.
@@ -308,7 +309,7 @@ a string/length pair.
     Perl_refcounted_he_new_pv(aTHX_ cophh, key, hash, value, flags)
 
 /*
-=for apidoc Am|COPHH *|cophh_store_sv|const COPHH *cophh|SV *key|U32 hash|SV *value|U32 flags
+=for apidoc Amx|COPHH *|cophh_store_sv|const COPHH *cophh|SV *key|U32 hash|SV *value|U32 flags
 
 Like L</cophh_store_pvn>, but takes a Perl scalar instead of a
 string/length pair.
@@ -320,7 +321,7 @@ string/length pair.
     Perl_refcounted_he_new_sv(aTHX_ cophh, key, hash, value, flags)
 
 /*
-=for apidoc Am|COPHH *|cophh_delete_pvn|COPHH *cophh|const char *keypv|STRLEN keylen|U32 hash|U32 flags
+=for apidoc Amx|COPHH *|cophh_delete_pvn|COPHH *cophh|const char *keypv|STRLEN keylen|U32 hash|U32 flags
 
 Delete a key and its associated value from the cop hints hash I<cophh>,
 and returns the modified hash.  The returned hash pointer is in general
@@ -341,7 +342,7 @@ hash of the key string, or zero if it has not been precomputed.
        (SV *)NULL, flags)
 
 /*
-=for apidoc Am|COPHH *|cophh_delete_pvs|const COPHH *cophh|const char *key|U32 flags
+=for apidoc Amx|COPHH *|cophh_delete_pvs|const COPHH *cophh|const char *key|U32 flags
 
 Like L</cophh_delete_pvn>, but takes a literal string instead of a
 string/length pair, and no precomputed hash.
@@ -354,7 +355,7 @@ string/length pair, and no precomputed hash.
        (SV *)NULL, flags)
 
 /*
-=for apidoc Am|COPHH *|cophh_delete_pv|const COPHH *cophh|const char *key|U32 hash|U32 flags
+=for apidoc Amx|COPHH *|cophh_delete_pv|const COPHH *cophh|const char *key|U32 hash|U32 flags
 
 Like L</cophh_delete_pvn>, but takes a nul-terminated string instead of
 a string/length pair.
@@ -366,7 +367,7 @@ a string/length pair.
     Perl_refcounted_he_new_pv(aTHX_ cophh, key, hash, (SV *)NULL, flags)
 
 /*
-=for apidoc Am|COPHH *|cophh_delete_sv|const COPHH *cophh|SV *key|U32 hash|U32 flags
+=for apidoc Amx|COPHH *|cophh_delete_sv|const COPHH *cophh|SV *key|U32 hash|U32 flags
 
 Like L</cophh_delete_pvn>, but takes a Perl scalar instead of a
 string/length pair.
@@ -555,7 +556,7 @@ be zero.
 
 /* If $[ is non-zero, it's stored in cop_hints under the key "$[", and
    HINT_ARYBASE is set to indicate this.
-   Setting it is ineficient due to the need to create 2 mortal SVs, but as
+   Setting it is inefficient due to the need to create 2 mortal SVs, but as
    using $[ is highly discouraged, no sane Perl code will be using it.  */
 #define CopARYBASE_get(c)      \
        ((CopHINTS_get(c) & HINT_ARYBASE)                               \
@@ -617,7 +618,8 @@ struct block_format {
 #define PUSHSUB_BASE(cx)                                               \
        ENTRY_PROBE(GvENAME(CvGV(cv)),                                  \
                CopFILE((const COP *)CvSTART(cv)),                      \
-               CopLINE((const COP *)CvSTART(cv)));                     \
+               CopLINE((const COP *)CvSTART(cv)),                      \
+               CopSTASHPV((const COP *)CvSTART(cv)));                  \
                                                                        \
        cx->blk_sub.cv = cv;                                            \
        cx->blk_sub.olddepth = CvDEPTH(cv);                             \
@@ -667,7 +669,8 @@ struct block_format {
     STMT_START {                                                       \
        RETURN_PROBE(GvENAME(CvGV((const CV*)cx->blk_sub.cv)),          \
                CopFILE((COP*)CvSTART((const CV*)cx->blk_sub.cv)),      \
-               CopLINE((COP*)CvSTART((const CV*)cx->blk_sub.cv)));     \
+               CopLINE((COP*)CvSTART((const CV*)cx->blk_sub.cv)),      \
+               CopSTASHPV((COP*)CvSTART((const CV*)cx->blk_sub.cv)));  \
                                                                        \
        if (CxHASARGS(cx)) {                                            \
            POP_SAVEARRAY();                                            \
@@ -908,7 +911,6 @@ struct subst {
 #define sb_maxiters    cx_u.cx_subst.sbu_maxiters
 #define sb_rflags      cx_u.cx_subst.sbu_rflags
 #define sb_oldsave     cx_u.cx_subst.sbu_oldsave
-#define sb_once                cx_u.cx_subst.sbu_once
 #define sb_rxtainted   cx_u.cx_subst.sbu_rxtainted
 #define sb_orig                cx_u.cx_subst.sbu_orig
 #define sb_dstr                cx_u.cx_subst.sbu_dstr
@@ -1062,6 +1064,8 @@ L<perlcall>.
 #define G_UNDEF_FILL  512      /* Fill the stack with &PL_sv_undef
                                   A special case for UNSHIFT in
                                   Perl_magic_methcall().  */
+#define G_WRITING_TO_STDERR 1024 /* Perl_write_to_stderr() is calling
+                                   Perl_magic_methcall().  */
 
 /* flag bits for PL_in_eval */
 #define EVAL_NULL      0       /* not in an eval */