From 08fd6ff37f71485e2fc04bc6ce07d2a483c36702 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 17 Feb 2012 19:44:26 -0500 Subject: Sync regex code with Tcl 8.5.11. Sync our regex code with upstream changes since last time we did this, which was Tcl 8.5.0 (see commit df1e965e12cdd48c11057ee6e15346ee2b8b02f5). There are no functional changes here; the main point is just to lay down a commit-log marker that somebody has looked at this recently, and to do what we can to keep the two codebases comparable. --- src/backend/regex/rege_dfa.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'src/backend/regex/rege_dfa.c') diff --git a/src/backend/regex/rege_dfa.c b/src/backend/regex/rege_dfa.c index e521261a571..f4fd41458bd 100644 --- a/src/backend/regex/rege_dfa.c +++ b/src/backend/regex/rege_dfa.c @@ -272,36 +272,35 @@ static struct dfa * newdfa(struct vars * v, struct cnfa * cnfa, struct colormap * cm, - struct smalldfa * small) /* preallocated space, may be NULL */ + struct smalldfa * sml) /* preallocated space, may be NULL */ { struct dfa *d; size_t nss = cnfa->nstates * 2; int wordsper = (cnfa->nstates + UBITS - 1) / UBITS; - struct smalldfa *smallwas = small; + struct smalldfa *smallwas = sml; assert(cnfa != NULL && cnfa->nstates != 0); if (nss <= FEWSTATES && cnfa->ncolors <= FEWCOLORS) { assert(wordsper == 1); - if (small == NULL) + if (sml == NULL) { - small = (struct smalldfa *) MALLOC( - sizeof(struct smalldfa)); - if (small == NULL) + sml = (struct smalldfa *) MALLOC(sizeof(struct smalldfa)); + if (sml == NULL) { ERR(REG_ESPACE); return NULL; } } - d = &small->dfa; - d->ssets = small->ssets; - d->statesarea = small->statesarea; + d = &sml->dfa; + d->ssets = sml->ssets; + d->statesarea = sml->statesarea; d->work = &d->statesarea[nss]; - d->outsarea = small->outsarea; - d->incarea = small->incarea; + d->outsarea = sml->outsarea; + d->incarea = sml->incarea; d->cptsmalloced = 0; - d->mallocarea = (smallwas == NULL) ? (char *) small : NULL; + d->mallocarea = (smallwas == NULL) ? (char *) sml : NULL; } else { -- cgit v1.2.3