aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-07-05 07:25:05 +0000
committerRichard M. Stallman1994-07-05 07:25:05 +0000
commitd0a11f95f9c779adf1d808bb751c345857d533fc (patch)
tree9233a6778647241f4a600d119aa339f53b98a73d /src
parent35a65fcedefa225bca856ea802a7bc758b48bde3 (diff)
downloademacs-d0a11f95f9c779adf1d808bb751c345857d533fc.tar.gz
emacs-d0a11f95f9c779adf1d808bb751c345857d533fc.zip
Be less eager to define MATCH_MAY_ALLOCATE.
Diffstat (limited to 'src')
-rw-r--r--src/regex.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/regex.c b/src/regex.c
index bd9ad6f6972..0cfd4969982 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -898,8 +898,8 @@ static const char *re_error_msg[] =
898 ralloc heap) shift the data out from underneath the regexp 898 ralloc heap) shift the data out from underneath the regexp
899 routines. 899 routines.
900 900
901 Here's another reason to avoid allocation: Emacs insists on 901 Here's another reason to avoid allocation: Emacs
902 processing input from X in a signal handler; processing X input may 902 processes input from X in a signal handler; processing X input may
903 call malloc; if input arrives while a matching routine is calling 903 call malloc; if input arrives while a matching routine is calling
904 malloc, then we're scrod. But Emacs can't just block input while 904 malloc, then we're scrod. But Emacs can't just block input while
905 calling matching routines; then we don't notice interrupts when 905 calling matching routines; then we don't notice interrupts when
@@ -910,8 +910,9 @@ static const char *re_error_msg[] =
910/* Normally, this is fine. */ 910/* Normally, this is fine. */
911#define MATCH_MAY_ALLOCATE 911#define MATCH_MAY_ALLOCATE
912 912
913/* But under some circumstances, it's not. */ 913/* The match routines may not allocate if (1) they would do it with malloc
914#if defined (emacs) || (defined (REL_ALLOC) && defined (C_ALLOCA)) 914 and (2) it's not safe for htem to use malloc. */
915#if (defined (C_ALLOCA) || defined (REGEX_MALLOC)) && (defined (emacs) || defined (REL_ALLOC))
915#undef MATCH_MAY_ALLOCATE 916#undef MATCH_MAY_ALLOCATE
916#endif 917#endif
917 918