diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2005-04-25 01:58:15 +0300 |
---|---|---|
committer | Steve Hay <SteveHay@planit.com> | 2005-04-25 07:47:11 +0000 |
commit | aadb217dbe1b43fbd45cb1644a86dd26d09068d0 (patch) | |
tree | f1347bfcdab878b369720066765c6126f125bac5 /pp_pack.c | |
parent | f464ba52b9670216e4d7f1e806fdbca7fb072215 (diff) | |
download | perl-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.c | 24 |
1 files changed, 21 insertions, 3 deletions
@@ -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 */ |