summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-01-17 03:24:48 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-01-17 03:24:48 +0000
commit76d3c696f3f9d8be0bea9b002ddfc255153cfadd (patch)
treedfee2903009a08674d10fa46c301ae8d7486f839 /gv.c
parenteabb5a47cfff827abe7f644eb4ce7727ae1159a4 (diff)
downloadperl-76d3c696f3f9d8be0bea9b002ddfc255153cfadd.tar.gz
Define SIG_SIZE, the number of elements in the sig_name and
sig_num arrays, including the final NULL entry. p4raw-id: //depot/perl@8459
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gv.c b/gv.c
index 53389bfdae..8b15d41334 100644
--- a/gv.c
+++ b/gv.c
@@ -750,15 +750,14 @@ Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type)
HV *hv;
I32 i;
if (!PL_psig_ptr) {
- int sig_num[] = { SIG_NUM };
- New(73, PL_psig_ptr, sizeof(sig_num)/sizeof(*sig_num), SV*);
- New(73, PL_psig_name, sizeof(sig_num)/sizeof(*sig_num), SV*);
- New(73, PL_psig_pend, sizeof(sig_num)/sizeof(*sig_num), int);
+ New(73, PL_psig_ptr, SIG_SIZE, SV*);
+ New(73, PL_psig_name, SIG_SIZE, SV*);
+ New(73, PL_psig_pend, SIG_SIZE, int);
}
GvMULTI_on(gv);
hv = GvHVn(gv);
hv_magic(hv, Nullgv, 'S');
- for (i = 1; PL_sig_name[i]; i++) {
+ for (i = 1; i < SIG_SIZE; i++) {
SV ** init;
init = hv_fetch(hv, PL_sig_name[i], strlen(PL_sig_name[i]), 1);
if (init)