diff options
author | Jim Cromie <jcromie@cpan.org> | 2005-07-06 08:19:53 -0600 |
---|---|---|
committer | Steve Hay <SteveHay@planit.com> | 2005-07-08 16:35:10 +0000 |
commit | a02a5408b2f199007c4dcb74559cc79066307ada (patch) | |
tree | b5456b7513dec78b81e08371fbd59138e2edfe72 /regcomp.c | |
parent | bdf3085f9fca00a6148ef3f26060d442844b64bd (diff) | |
download | perl-a02a5408b2f199007c4dcb74559cc79066307ada.tar.gz |
Re: janitorial work ? [patch]
Message-ID: <42CC3CE9.5050606@divsol.com>
(reverted all dual-lived modules since they must work with older
perls too so must wait for a new Devel::PPPort)
p4raw-id: //depot/perl@25101
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 32 |
1 files changed, 16 insertions, 16 deletions
@@ -814,7 +814,7 @@ and would end up looking like: } STMT_END #define TRIE_LIST_NEW(state) STMT_START { \ - Newz( 1023, trie->states[ state ].trans.list, \ + Newxz( trie->states[ state ].trans.list, \ 4, reg_trie_trans_le ); \ TRIE_LIST_CUR( state ) = 1; \ TRIE_LIST_LEN( state ) = 4; \ @@ -846,10 +846,10 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch, regnode *firs GET_RE_DEBUG_FLAGS_DECL; - Newz( 848200, trie, 1, reg_trie_data ); + Newxz( trie, 1, reg_trie_data ); trie->refcount = 1; RExC_rx->data->data[ data_slot ] = (void*)trie; - Newz( 848201, trie->charmap, 256, U16 ); + Newxz( trie->charmap, 256, U16 ); DEBUG_r({ trie->words = newAV(); trie->revcharmap = newAV(); @@ -968,7 +968,7 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch, regnode *firs STRLEN transcount = 1; - Newz( 848204, trie->states, trie->charcount + 2, reg_trie_state ); + Newxz( trie->states, trie->charcount + 2, reg_trie_state ); TRIE_LIST_NEW(1); next_alloc = 2; @@ -1078,7 +1078,7 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch, regnode *firs PerlIO_printf( Perl_debug_log, "\n\n" ); }); - Newz( 848203, trie->trans, transcount ,reg_trie_trans ); + Newxz( trie->trans, transcount ,reg_trie_trans ); { U32 state; U32 tp = 0; @@ -1185,9 +1185,9 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch, regnode *firs */ - Newz( 848203, trie->trans, ( trie->charcount + 1 ) * trie->uniquecharcount + 1, + Newxz( trie->trans, ( trie->charcount + 1 ) * trie->uniquecharcount + 1, reg_trie_trans ); - Newz( 848204, trie->states, trie->charcount + 2, reg_trie_state ); + Newxz( trie->states, trie->charcount + 2, reg_trie_state ); next_alloc = trie->uniquecharcount + 1; for ( cur = first ; cur < last ; cur = regnext( cur ) ) { @@ -2757,9 +2757,9 @@ S_add_data(pTHX_ RExC_state_t *pRExC_state, I32 n, const char *s) RExC_rx->data->count += n; } else { - Newc(1207, RExC_rx->data, sizeof(*RExC_rx->data) + sizeof(void*) * (n - 1), + Newxc(RExC_rx->data, sizeof(*RExC_rx->data) + sizeof(void*) * (n - 1), char, struct reg_data); - New(1208, RExC_rx->data->what, n, U8); + Newx(RExC_rx->data->what, n, U8); RExC_rx->data->count = n; } Copy(s, RExC_rx->data->what + RExC_rx->data->count - n, n, U8); @@ -2872,7 +2872,7 @@ Perl_pregcomp(pTHX_ char *exp, char *xend, PMOP *pm) RExC_whilem_seen = 15; /* Allocate space and initialize. */ - Newc(1001, r, sizeof(regexp) + (unsigned)RExC_size * sizeof(regnode), + Newxc(r, sizeof(regexp) + (unsigned)RExC_size * sizeof(regnode), char, regexp); if (r == NULL) FAIL("Regexp out of space"); @@ -2895,7 +2895,7 @@ Perl_pregcomp(pTHX_ char *exp, char *xend, PMOP *pm) r->startp = 0; /* Useful during FAIL. */ r->endp = 0; /* Useful during FAIL. */ - Newz(1304, r->offsets, 2*RExC_size+1, U32); /* MJD 20001228 */ + Newxz(r->offsets, 2*RExC_size+1, U32); /* MJD 20001228 */ if (r->offsets) { r->offsets[0] = RExC_size; } @@ -2934,7 +2934,7 @@ Perl_pregcomp(pTHX_ char *exp, char *xend, PMOP *pm) /* XXXX To minimize changes to RE engine we always allocate 3-units-long substrs field. */ - Newz(1004, r->substrs, 1, struct reg_substr_data); + Newxz(r->substrs, 1, struct reg_substr_data); StructCopy(&zero_scan_data, &data, scan_data_t); /* XXXX Should not we check for something else? Usually it is OPEN1... */ @@ -3113,7 +3113,7 @@ Perl_pregcomp(pTHX_ char *exp, char *xend, PMOP *pm) { const I32 n = add_data(pRExC_state, 1, "f"); - New(1006, RExC_rx->data->data[n], 1, + Newx(RExC_rx->data->data[n], 1, struct regnode_charclass_class); StructCopy(data.start_class, (struct regnode_charclass_class*)RExC_rx->data->data[n], @@ -3169,7 +3169,7 @@ Perl_pregcomp(pTHX_ char *exp, char *xend, PMOP *pm) { const I32 n = add_data(pRExC_state, 1, "f"); - New(1006, RExC_rx->data->data[n], 1, + Newx(RExC_rx->data->data[n], 1, struct regnode_charclass_class); StructCopy(data.start_class, (struct regnode_charclass_class*)RExC_rx->data->data[n], @@ -3193,8 +3193,8 @@ Perl_pregcomp(pTHX_ char *exp, char *xend, PMOP *pm) r->reganch |= ROPT_EVAL_SEEN; if (RExC_seen & REG_SEEN_CANY) r->reganch |= ROPT_CANY_SEEN; - Newz(1002, r->startp, RExC_npar, I32); - Newz(1002, r->endp, RExC_npar, I32); + Newxz(r->startp, RExC_npar, I32); + Newxz(r->endp, RExC_npar, I32); PL_regdata = r->data; /* for regprop() */ DEBUG_COMPILE_r(regdump(r)); return(r); |