summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-07-16 18:42:59 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-07-16 18:42:59 -0700
commitaebc0cbee0c83e7c1648507658f739153cf1176a (patch)
treec2fec976e677d375d3a3c48673b50124a93b8b39
parent8375c93eec5677d8587491a0541d33bc206a445a (diff)
downloadperl-aebc0cbee0c83e7c1648507658f739153cf1176a.tar.gz
Rename store/fetch_cop_label as cop_*
This makes them consistent with other functions that put the basic datum type first (like hv_*, sv_*, cophh_*). Since fetch_cop_label is marked as experimental (M), this change should be OK.
-rw-r--r--cop.h2
-rw-r--r--embed.fnc4
-rw-r--r--global.sym4
-rw-r--r--hv.c14
-rw-r--r--op.c2
-rw-r--r--pp_ctl.c4
-rw-r--r--proto.h22
-rw-r--r--t/porting/known_pod_issues.dat2
8 files changed, 27 insertions, 27 deletions
diff --git a/cop.h b/cop.h
index e6650a2400..6512451f67 100644
--- a/cop.h
+++ b/cop.h
@@ -542,7 +542,7 @@ be zero.
#define cop_hints_2hv(cop, flags) \
cophh_2hv(CopHINTHASH_get(cop), flags)
-#define CopLABEL(c) Perl_fetch_cop_label(aTHX_ (c), NULL, NULL)
+#define CopLABEL(c) Perl_cop_fetch_label(aTHX_ (c), NULL, NULL)
#define CopLABEL_alloc(pv) ((pv)?savepv(pv):NULL)
#define CopSTASH_ne(c,hv) (!CopSTASH_eq(c,hv))
diff --git a/embed.fnc b/embed.fnc
index 2c35c35230..077955f367 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -2454,10 +2454,10 @@ p |void |boot_core_mro
Apon |void |sys_init |NN int* argc|NN char*** argv
Apon |void |sys_init3 |NN int* argc|NN char*** argv|NN char*** env
Apon |void |sys_term
-ApoM |const char *|fetch_cop_label|NN COP *const cop \
+ApoM |const char *|cop_fetch_label|NN COP *const cop \
|NULLOK STRLEN *len|NULLOK U32 *flags
: Only used in op.c and the perl compiler
-ApoM |void|store_cop_label \
+ApoM |void|cop_store_label \
|NN COP *const cop|NN const char *label|STRLEN len|U32 flags
xpo |int |keyword_plugin_standard|NN char* keyword_ptr|STRLEN keyword_len|NN OP** op_ptr
diff --git a/global.sym b/global.sym
index da433ade38..4f01c7bd32 100644
--- a/global.sym
+++ b/global.sym
@@ -65,6 +65,8 @@ Perl_ck_warner
Perl_ck_warner_d
Perl_ckwarn
Perl_ckwarn_d
+Perl_cop_fetch_label
+Perl_cop_store_label
Perl_croak
Perl_croak_no_modify
Perl_croak_sv
@@ -122,7 +124,6 @@ Perl_eval_pv
Perl_eval_sv
Perl_fbm_compile
Perl_fbm_instr
-Perl_fetch_cop_label
Perl_filter_add
Perl_filter_del
Perl_filter_read
@@ -594,7 +595,6 @@ Perl_sortsv_flags
Perl_stack_grow
Perl_start_subparse
Perl_stashpv_hvname_match
-Perl_store_cop_label
Perl_str_to_version
Perl_sv_2bool_flags
Perl_sv_2cv
diff --git a/hv.c b/hv.c
index 0b46ef6635..f8f16b640a 100644
--- a/hv.c
+++ b/hv.c
@@ -3288,7 +3288,7 @@ Perl_refcounted_he_inc(pTHX_ struct refcounted_he *he)
}
/*
-=for apidoc fetch_cop_label
+=for apidoc cop_fetch_label
Returns the label attached to a cop.
The flags pointer may be set to C<SVf_UTF8> or 0.
@@ -3299,10 +3299,10 @@ The flags pointer may be set to C<SVf_UTF8> or 0.
/* pp_entereval is aware that labels are stored with a key ':' at the top of
the linked list. */
const char *
-Perl_fetch_cop_label(pTHX_ COP *const cop, STRLEN *len, U32 *flags) {
+Perl_cop_fetch_label(pTHX_ COP *const cop, STRLEN *len, U32 *flags) {
struct refcounted_he *const chain = cop->cop_hints_hash;
- PERL_ARGS_ASSERT_FETCH_COP_LABEL;
+ PERL_ARGS_ASSERT_COP_FETCH_LABEL;
if (!chain)
return NULL;
@@ -3333,7 +3333,7 @@ Perl_fetch_cop_label(pTHX_ COP *const cop, STRLEN *len, U32 *flags) {
}
/*
-=for apidoc store_cop_label
+=for apidoc cop_store_label
Save a label into a C<cop_hints_hash>. You need to set flags to C<SVf_UTF8>
for a utf-8 label.
@@ -3342,14 +3342,14 @@ for a utf-8 label.
*/
void
-Perl_store_cop_label(pTHX_ COP *const cop, const char *label, STRLEN len,
+Perl_cop_store_label(pTHX_ COP *const cop, const char *label, STRLEN len,
U32 flags)
{
SV *labelsv;
- PERL_ARGS_ASSERT_STORE_COP_LABEL;
+ PERL_ARGS_ASSERT_COP_STORE_LABEL;
if (flags & ~(SVf_UTF8))
- Perl_croak(aTHX_ "panic: store_cop_label illegal flag bits 0x%" UVxf,
+ Perl_croak(aTHX_ "panic: cop_store_label illegal flag bits 0x%" UVxf,
(UV)flags);
labelsv = newSVpvn_flags(label, len, SVs_TEMP);
if (flags & SVf_UTF8)
diff --git a/op.c b/op.c
index b0c09983de..e7cff45467 100644
--- a/op.c
+++ b/op.c
@@ -4885,7 +4885,7 @@ Perl_newSTATEOP(pTHX_ I32 flags, char *label, OP *o)
cop->cop_warnings = DUP_WARNINGS(PL_curcop->cop_warnings);
CopHINTHASH_set(cop, cophh_copy(CopHINTHASH_get(PL_curcop)));
if (label) {
- Perl_store_cop_label(aTHX_ cop, label, strlen(label), 0);
+ Perl_cop_store_label(aTHX_ cop, label, strlen(label), 0);
PL_hints |= HINT_BLOCK_SCOPE;
/* It seems that we need to defer freeing this pointer, as other parts
diff --git a/pp_ctl.c b/pp_ctl.c
index 63efd9acf5..533ff5f33a 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -4181,14 +4181,14 @@ PP(pp_entereval)
SAVECOMPILEWARNINGS();
PL_compiling.cop_warnings = DUP_WARNINGS(PL_curcop->cop_warnings);
cophh_free(CopHINTHASH_get(&PL_compiling));
- if (Perl_fetch_cop_label(aTHX_ PL_curcop, NULL, NULL)) {
+ if (Perl_cop_fetch_label(aTHX_ PL_curcop, NULL, NULL)) {
/* The label, if present, is the first entry on the chain. So rather
than writing a blank label in front of it (which involves an
allocation), just use the next entry in the chain. */
PL_compiling.cop_hints_hash
= cophh_copy(PL_curcop->cop_hints_hash->refcounted_he_next);
/* Check the assumption that this removed the label. */
- assert(Perl_fetch_cop_label(aTHX_ &PL_compiling, NULL, NULL) == NULL);
+ assert(Perl_cop_fetch_label(aTHX_ &PL_compiling, NULL, NULL) == NULL);
}
else
PL_compiling.cop_hints_hash = cophh_copy(PL_curcop->cop_hints_hash);
diff --git a/proto.h b/proto.h
index 50040b51e8..27788b52df 100644
--- a/proto.h
+++ b/proto.h
@@ -560,6 +560,17 @@ PERL_CALLCONV bool Perl_ckwarn_d(pTHX_ U32 w);
PERL_CALLCONV OP* Perl_convert(pTHX_ I32 optype, I32 flags, OP* o)
__attribute__warn_unused_result__;
+PERL_CALLCONV const char * Perl_cop_fetch_label(pTHX_ COP *const cop, STRLEN *len, U32 *flags)
+ __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_COP_FETCH_LABEL \
+ assert(cop)
+
+PERL_CALLCONV void Perl_cop_store_label(pTHX_ COP *const cop, const char *label, STRLEN len, U32 flags)
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_COP_STORE_LABEL \
+ assert(cop); assert(label)
+
PERL_CALLCONV PERL_CONTEXT* Perl_create_eval_scope(pTHX_ U32 flags);
PERL_CALLCONV void Perl_croak(pTHX_ const char* pat, ...)
__attribute__noreturn__
@@ -937,11 +948,6 @@ PERL_CALLCONV bool Perl_feature_is_enabled(pTHX_ const char *const name, STRLEN
#define PERL_ARGS_ASSERT_FEATURE_IS_ENABLED \
assert(name)
-PERL_CALLCONV const char * Perl_fetch_cop_label(pTHX_ COP *const cop, STRLEN *len, U32 *flags)
- __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_FETCH_COP_LABEL \
- assert(cop)
-
PERL_CALLCONV SV* Perl_filter_add(pTHX_ filter_t funcp, SV* datasv);
PERL_CALLCONV void Perl_filter_del(pTHX_ filter_t funcp)
__attribute__nonnull__(pTHX_1);
@@ -3526,12 +3532,6 @@ PERL_CALLCONV bool Perl_stashpv_hvname_match(pTHX_ const COP *c, const HV *hv)
#define PERL_ARGS_ASSERT_STASHPV_HVNAME_MATCH \
assert(c); assert(hv)
-PERL_CALLCONV void Perl_store_cop_label(pTHX_ COP *const cop, const char *label, STRLEN len, U32 flags)
- __attribute__nonnull__(pTHX_1)
- __attribute__nonnull__(pTHX_2);
-#define PERL_ARGS_ASSERT_STORE_COP_LABEL \
- assert(cop); assert(label)
-
PERL_CALLCONV NV Perl_str_to_version(pTHX_ SV *sv)
__attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
diff --git a/t/porting/known_pod_issues.dat b/t/porting/known_pod_issues.dat
index af25387944..d40c747873 100644
--- a/t/porting/known_pod_issues.dat
+++ b/t/porting/known_pod_issues.dat
@@ -213,7 +213,7 @@ os2/os2/os2-rexx/rexx.pm Verbatim line length including indents exceeds 80 by 1
pod/perl.pod Verbatim line length including indents exceeds 80 by 9
pod/perlaix.pod Verbatim line length including indents exceeds 80 by 11
pod/perlapi.pod ? Should you be using L<...> instead of 86
-pod/perlapi.pod Verbatim line length including indents exceeds 80 by 23
+pod/perlapi.pod Verbatim line length including indents exceeds 80 by 24
pod/perlapi.pod unresolved internal link 3
pod/perlapio.pod Verbatim line length including indents exceeds 80 by 5
pod/perlbook.pod Verbatim line length including indents exceeds 80 by 1