Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
d0a11f95
Commit
d0a11f95
authored
Jul 05, 1994
by
Richard M. Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Be less eager to define MATCH_MAY_ALLOCATE.
parent
35a65fce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
src/regex.c
src/regex.c
+5
-4
No files found.
src/regex.c
View file @
d0a11f95
...
...
@@ -898,8 +898,8 @@ static const char *re_error_msg[] =
ralloc heap) shift the data out from underneath the regexp
routines.
Here's another reason to avoid allocation: Emacs
insists on
process
ing
input from X in a signal handler; processing X input may
Here's another reason to avoid allocation: Emacs
process
es
input from X in a signal handler; processing X input may
call malloc; if input arrives while a matching routine is calling
malloc, then we're scrod. But Emacs can't just block input while
calling matching routines; then we don't notice interrupts when
...
...
@@ -910,8 +910,9 @@ static const char *re_error_msg[] =
/* Normally, this is fine. */
#define MATCH_MAY_ALLOCATE
/* But under some circumstances, it's not. */
#if defined (emacs) || (defined (REL_ALLOC) && defined (C_ALLOCA))
/* The match routines may not allocate if (1) they would do it with malloc
and (2) it's not safe for htem to use malloc. */
#if (defined (C_ALLOCA) || defined (REGEX_MALLOC)) && (defined (emacs) || defined (REL_ALLOC))
#undef MATCH_MAY_ALLOCATE
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment