summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-06-30 05:12:57 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-06-30 05:12:57 +0000
commit25eaa2138d60ea820620e1b1324f90a6b4f4adcd (patch)
treedf343c29db5bdb7836b0e000ba22ba06f00c6cec
parent4ebdfc9900a36429be5fe85719cf00fc3ef0ebf9 (diff)
downloadperl-25eaa2138d60ea820620e1b1324f90a6b4f4adcd.tar.gz
tweaks to overloaded constants (change#1259)
p4raw-link: @1259 on //depot/perl: b3ac6de7f0c7a63b73f1cf3ea9e371470f7d1cb0 p4raw-id: //depot/perl@1265
-rw-r--r--scope.c2
-rw-r--r--scope.h35
-rw-r--r--toke.c4
3 files changed, 23 insertions, 18 deletions
diff --git a/scope.c b/scope.c
index c95ae54c20..985c650b3c 100644
--- a/scope.c
+++ b/scope.c
@@ -806,7 +806,7 @@ leave_scope(I32 base)
case SAVEt_OP:
op = (OP*)SSPOPPTR;
break;
- case SAVEt_NOHINTS:
+ case SAVEt_HINTS:
if (GvHV(hintgv)) {
SvREFCNT_dec((SV*)GvHV(hintgv));
GvHV(hintgv) = NULL;
diff --git a/scope.h b/scope.h
index 1f8fb44a81..3ac4a59d51 100644
--- a/scope.h
+++ b/scope.h
@@ -25,7 +25,7 @@
#define SAVEt_AELEM 24
#define SAVEt_HELEM 25
#define SAVEt_OP 26
-#define SAVEt_NOHINTS 27
+#define SAVEt_HINTS 27
#define SSCHECK(need) if (savestack_ix + need > savestack_max) savestack_grow()
#define SSPUSHINT(i) (savestack[savestack_ix++].any_i32 = (I32)(i))
@@ -89,21 +89,26 @@
save_destructor(SOFT_CAST(void(*)_((void*)))(FUNC_NAME_TO_PTR(f)), \
SOFT_CAST(void*)(p))
#endif
-#define SAVESTACK_POS() STMT_START { \
- SSCHECK(2); \
- SSPUSHINT(stack_sp - stack_base); \
- SSPUSHINT(SAVEt_STACK_POS); \
- } STMT_END
+
+#define SAVESTACK_POS() \
+ STMT_START { \
+ SSCHECK(2); \
+ SSPUSHINT(stack_sp - stack_base); \
+ SSPUSHINT(SAVEt_STACK_POS); \
+ } STMT_END
+
#define SAVEOP() save_op()
-#define SAVEHINTS() STMT_START { \
- if (hints & HINT_LOCALIZE_HH) \
- save_hints(); \
- else { \
- SSCHECK(2); \
- SSPUSHINT(hints); \
- SSPUSHINT(SAVEt_NOHINTS); \
- } \
- } STMT_END
+
+#define SAVEHINTS() \
+ STMT_START { \
+ if (hints & HINT_LOCALIZE_HH) \
+ save_hints(); \
+ else { \
+ SSCHECK(2); \
+ SSPUSHINT(hints); \
+ SSPUSHINT(SAVEt_HINTS); \
+ } \
+ } STMT_END
/* A jmpenv packages the state required to perform a proper non-local jump.
* Note that there is a start_env initialized when perl starts, and top_env
diff --git a/toke.c b/toke.c
index 24bf27dd5e..c734fc8813 100644
--- a/toke.c
+++ b/toke.c
@@ -4716,7 +4716,7 @@ STATIC SV *
new_constant(char *s, STRLEN len, char *key, SV *sv, SV *pv, char *type)
{
dSP;
- HV *table = perl_get_hv("\10", FALSE); /* ^H */
+ HV *table = GvHV(hintgv); /* ^H */
BINOP myop;
SV *res;
bool oldcatch = CATCH_GET;
@@ -4757,7 +4757,7 @@ new_constant(char *s, STRLEN len, char *key, SV *sv, SV *pv, char *type)
PUTBACK;
pp_pushmark(ARGS);
- EXTEND(sp, 3);
+ EXTEND(sp, 4);
PUSHs(pv);
PUSHs(sv);
PUSHs(typesv);