diff options
author | Gustavo Niemeyer <gustavo@niemeyer.net> | 2003-04-27 06:58:54 (GMT) |
---|---|---|
committer | Gustavo Niemeyer <gustavo@niemeyer.net> | 2003-04-27 06:58:54 (GMT) |
commit | c23fb774772949b7861f91eec987b1cd414d5a3c (patch) | |
tree | 8f0d405eb5f84c4c7b0b5b4db1cfb15999695152 /Modules/_sre.c | |
parent | 7628f1ffff2ecaad085e5e68f438deafed15fa43 (diff) | |
download | cpython-c23fb774772949b7861f91eec987b1cd414d5a3c.zip cpython-c23fb774772949b7861f91eec987b1cd414d5a3c.tar.gz cpython-c23fb774772949b7861f91eec987b1cd414d5a3c.tar.bz2 |
Applying patch #726869 by Andrew I MacIntyre, reducing in _sre.c the
recursion limit for certain setups of FreeBSD and OS/2.
Diffstat (limited to 'Modules/_sre.c')
-rw-r--r-- | Modules/_sre.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Modules/_sre.c b/Modules/_sre.c index be6920d..3f17d13 100644 --- a/Modules/_sre.c +++ b/Modules/_sre.c @@ -72,9 +72,18 @@ static char copyright[] = /* FIXME: maybe the limit should be 40000 / sizeof(void*) ? */ #define USE_RECURSION_LIMIT 7500 #else +#if defined(__GNUC__) && (__GNUC__ > 2) && \ + (defined(__FreeBSD__) || defined(PYOS_OS2)) +/* gcc 3.x, on FreeBSD and OS/2+EMX and at optimisation levels of + * -O3 (autoconf default) and -O2 (EMX port default), generates code + * for _sre that fails for the default recursion limit. + */ +#define USE_RECURSION_LIMIT 7500 +#else #define USE_RECURSION_LIMIT 10000 #endif #endif +#endif /* enables fast searching */ #define USE_FAST_SEARCH |