summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-09-02 15:57:24 +0100
committerNicholas Clark <nick@ccl4.org>2010-09-02 15:57:24 +0100
commitd6747b7ae5ffdaaf8364760ca2abdcb734c664c8 (patch)
tree62184510cbe78416af2c7279db9a8119931bbe27 /pp_ctl.c
parentf4b4ed7b4eca79b25054dfeafa0aac0dbd41a507 (diff)
downloadperl-d6747b7ae5ffdaaf8364760ca2abdcb734c664c8.tar.gz
Change the first argument of Perl_fetch_cop_label() to COP *
From a suggestion from Ben Morrow. The first argument used to be struct refcounted_he *, which exposed an implementation detail - that the COP's labels are (now) stored in this way. Google Code Search and an unpacked CPAN both fail to find any users of this API, so the impact should be minimal.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 1e90894f16..8c0c52018a 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3818,15 +3818,14 @@ PP(pp_entereval)
if (PL_compiling.cop_hints_hash) {
Perl_refcounted_he_free(aTHX_ PL_compiling.cop_hints_hash);
}
- if (Perl_fetch_cop_label(aTHX_ PL_curcop->cop_hints_hash, NULL, NULL)) {
+ if (Perl_fetch_cop_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
= PL_curcop->cop_hints_hash->refcounted_he_next;
/* Check the assumption that this removed the label. */
- assert(Perl_fetch_cop_label(aTHX_ PL_compiling.cop_hints_hash, NULL,
- NULL) == NULL);
+ assert(Perl_fetch_cop_label(aTHX_ &PL_compiling, NULL, NULL) == NULL);
}
else
PL_compiling.cop_hints_hash = PL_curcop->cop_hints_hash;