summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-12-01 11:06:05 +0000
committerNicholas Clark <nick@ccl4.org>2008-12-01 11:06:05 +0000
commitda8315f8f4d9d4df8cbebe108ef0ddb4795856d7 (patch)
tree7d03677f2b5fc5934f812f6d7c1c68a019ac983d /scope.c
parent601cee3b44d5dc2533c9ca9da3e2820c4464c2af (diff)
downloadperl-da8315f8f4d9d4df8cbebe108ef0ddb4795856d7.tar.gz
Move the implmentation of SAVEHINTS() into a new Perl_save_hints() in
scope.c. "Inlined" macro functions in scope.h are actually space inefficient. p4raw-id: //depot/perl@34965
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/scope.c b/scope.c
index 14ad0b3c4e..9f53549650 100644
--- a/scope.c
+++ b/scope.c
@@ -536,6 +536,25 @@ Perl_save_destructor_x(pTHX_ DESTRUCTORFUNC_t f, void* p)
}
void
+Perl_save_hints(pTHX)
+{
+ dVAR;
+ if (PL_compiling.cop_hints_hash) {
+ HINTS_REFCNT_LOCK;
+ PL_compiling.cop_hints_hash->refcounted_he_refcnt++;
+ HINTS_REFCNT_UNLOCK;
+ }
+ SSCHECK(4);
+ if (PL_hints & HINT_LOCALIZE_HH) {
+ SSPUSHPTR(GvHV(PL_hintgv));
+ GvHV(PL_hintgv) = Perl_hv_copy_hints_hv(aTHX_ GvHV(PL_hintgv));
+ }
+ SSPUSHINT(PL_hints);
+ SSPUSHPTR(PL_compiling.cop_hints_hash);
+ SSPUSHINT(SAVEt_HINTS);
+}
+
+void
Perl_save_aelem(pTHX_ AV *av, I32 idx, SV **sptr)
{
dVAR;