1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-18 17:41:14 +03:00

Install Tcl regex fixes to sync our regex engine with Tcl 8.4.8 (up from

8.4.1).  This corrects some curious regex bugs, though not the greediness
issue I was hoping to find a solution for :-(
This commit is contained in:
Tom Lane 2004-11-24 22:57:09 +00:00
parent 38929bc06a
commit f5778c63e5

View File

@ -28,7 +28,7 @@
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Header: /cvsroot/pgsql/src/backend/regex/regcomp.c,v 1.39 2003/09/29 00:21:58 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/regex/regcomp.c,v 1.39.2.1 2004/11/24 22:57:09 tgl Exp $
*
*/
@ -589,10 +589,15 @@ makesearch(struct vars * v,
break;
if (b != NULL)
{ /* must be split */
if (s->tmp == NULL)
{ /* if not already in the list */
/* (fixes bugs 505048, 230589, */
/* 840258, 504785) */
s->tmp = slist;
slist = s;
}
}
}
/* do the splits */
for (s = slist; s != NULL; s = s2)
@ -2226,12 +2231,12 @@ stid(struct subre * t,
size_t bufsize)
{
/* big enough for hex int or decimal t->retry? */
if (bufsize < sizeof(int) * 2 + 3 || bufsize < sizeof(t->retry) * 3 + 1)
if (bufsize < sizeof(void *) * 2 + 3 || bufsize < sizeof(t->retry) * 3 + 1)
return "unable";
if (t->retry != 0)
sprintf(buf, "%d", t->retry);
else
sprintf(buf, "0x%x", (int) t); /* may lose bits, that's okay */
sprintf(buf, "%p", t);
return buf;
}
#endif /* REG_DEBUG */