summaryrefslogtreecommitdiff
path: root/pp_pack.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2005-04-25 01:58:15 +0300
committerSteve Hay <SteveHay@planit.com>2005-04-25 07:47:11 +0000
commitaadb217dbe1b43fbd45cb1644a86dd26d09068d0 (patch)
treef1347bfcdab878b369720066765c6126f125bac5 /pp_pack.c
parentf464ba52b9670216e4d7f1e806fdbca7fb072215 (diff)
downloadperl-aadb217dbe1b43fbd45cb1644a86dd26d09068d0.tar.gz
combopatch
Message-ID: <426BFA57.9060105@iki.fi> p4raw-id: //depot/perl@24318
Diffstat (limited to 'pp_pack.c')
-rw-r--r--pp_pack.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/pp_pack.c b/pp_pack.c
index 67d80f0412..58e3bb2a07 100644
--- a/pp_pack.c
+++ b/pp_pack.c
@@ -2351,7 +2351,21 @@ S_div128(pTHX_ SV *pnum, bool *done)
return (m);
}
-
+#define TEMPSYM_INIT(symptr, p, e) \
+ STMT_START { \
+ (symptr)->patptr = p; \
+ (symptr)->patend = e; \
+ (symptr)->grpbeg = NULL; \
+ (symptr)->grpend = NULL; \
+ (symptr)->grpend = NULL; \
+ (symptr)->code = 0; \
+ (symptr)->length = 0; \
+ (symptr)->howlen = 0; \
+ (symptr)->level = 0; \
+ (symptr)->flags = FLAG_PACK; \
+ (symptr)->strbeg = 0; \
+ (symptr)->previous = NULL; \
+ } STMT_END
/*
=for apidoc pack_cat
@@ -2365,10 +2379,12 @@ flags are not used. This call should not be used; use packlist instead.
void
Perl_pack_cat(pTHX_ SV *cat, char *pat, register char *patend, register SV **beglist, SV **endlist, SV ***next_in_list, U32 flags)
{
- tempsym_t sym = { pat, patend, NULL, NULL, 0, 0, 0, 0, FLAG_PACK, 0, NULL };
+ tempsym_t sym;
(void)next_in_list;
(void)flags;
+ TEMPSYM_INIT(&sym, pat, patend);
+
(void)pack_rec( cat, &sym, beglist, endlist );
}
@@ -2385,7 +2401,9 @@ void
Perl_packlist(pTHX_ SV *cat, char *pat, register char *patend, register SV **beglist, SV **endlist )
{
STRLEN no_len;
- tempsym_t sym = { pat, patend, NULL, NULL, 0, 0, 0, 0, FLAG_PACK, 0, NULL };
+ tempsym_t sym;
+
+ TEMPSYM_INIT(&sym, pat, patend);
/* We're going to do changes through SvPVX(cat). Make sure it's valid.
Also make sure any UTF8 flag is loaded */