aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2007-09-12 07:21:32 +0000
committerGlenn Morris2007-09-12 07:21:32 +0000
commitb588157e3bfb9e42954f9fa2ac7ea1c6ae722f6b (patch)
treedaeee1b3099653b72ac3f0471e4d763fb330e62f
parent0bda13a26e688bb78e8cfb426457d4dfdbbb3850 (diff)
downloademacs-b588157e3bfb9e42954f9fa2ac7ea1c6ae722f6b.tar.gz
emacs-b588157e3bfb9e42954f9fa2ac7ea1c6ae722f6b.zip
(C_ALLOCA): Remove all references and code that was only used when
this was defined.
-rw-r--r--src/regex.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/src/regex.c b/src/regex.c
index 66b84c9dfc2..125a3388f19 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -1366,18 +1366,12 @@ static const char *re_error_msgid[] =
1366/* Normally, this is fine. */ 1366/* Normally, this is fine. */
1367#define MATCH_MAY_ALLOCATE 1367#define MATCH_MAY_ALLOCATE
1368 1368
1369/* When using GNU C, we are not REALLY using the C alloca, no matter
1370 what config.h may say. So don't take precautions for it. */
1371#ifdef __GNUC__
1372# undef C_ALLOCA
1373#endif
1374
1375/* The match routines may not allocate if (1) they would do it with malloc 1369/* The match routines may not allocate if (1) they would do it with malloc
1376 and (2) it's not safe for them to use malloc. 1370 and (2) it's not safe for them to use malloc.
1377 Note that if REL_ALLOC is defined, matching would not use malloc for the 1371 Note that if REL_ALLOC is defined, matching would not use malloc for the
1378 failure stack, but we would still use it for the register vectors; 1372 failure stack, but we would still use it for the register vectors;
1379 so REL_ALLOC should not affect this. */ 1373 so REL_ALLOC should not affect this. */
1380#if (defined C_ALLOCA || defined REGEX_MALLOC) && defined emacs 1374#if defined REGEX_MALLOC && defined emacs
1381# undef MATCH_MAY_ALLOCATE 1375# undef MATCH_MAY_ALLOCATE
1382#endif 1376#endif
1383 1377
@@ -4454,11 +4448,6 @@ re_search_2 (bufp, str1, size1, str2, size2, startpos, range, regs, stop)
4454 4448
4455 val = re_match_2_internal (bufp, string1, size1, string2, size2, 4449 val = re_match_2_internal (bufp, string1, size1, string2, size2,
4456 startpos, regs, stop); 4450 startpos, regs, stop);
4457#ifndef REGEX_MALLOC
4458# ifdef C_ALLOCA
4459 alloca (0);
4460# endif
4461#endif
4462 4451
4463 if (val >= 0) 4452 if (val >= 0)
4464 return startpos; 4453 return startpos;
@@ -4894,9 +4883,6 @@ re_match (bufp, string, size, pos, regs)
4894{ 4883{
4895 int result = re_match_2_internal (bufp, NULL, 0, (re_char*) string, size, 4884 int result = re_match_2_internal (bufp, NULL, 0, (re_char*) string, size,
4896 pos, regs, size); 4885 pos, regs, size);
4897# if defined C_ALLOCA && !defined REGEX_MALLOC
4898 alloca (0);
4899# endif
4900 return result; 4886 return result;
4901} 4887}
4902WEAK_ALIAS (__re_match, re_match) 4888WEAK_ALIAS (__re_match, re_match)
@@ -4942,9 +4928,6 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
4942 result = re_match_2_internal (bufp, (re_char*) string1, size1, 4928 result = re_match_2_internal (bufp, (re_char*) string1, size1,
4943 (re_char*) string2, size2, 4929 (re_char*) string2, size2,
4944 pos, regs, stop); 4930 pos, regs, stop);
4945#if defined C_ALLOCA && !defined REGEX_MALLOC
4946 alloca (0);
4947#endif
4948 return result; 4931 return result;
4949} 4932}
4950WEAK_ALIAS (__re_match_2, re_match_2) 4933WEAK_ALIAS (__re_match_2, re_match_2)