mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 14:00:21 +02:00
* alloca.c (alloca): Undo yesterday's changes, and simply call
malloc directly for storage, and abort if we don't get what we want. The situation is much simpler --- just call malloc. Emacs has bizarre/evil requirements (signal handlers might malloc unless you set this global flag, so you have to set the flag around all calls to malloc) which we are certainly not going to conform to, so we can do the simple and obvious thing.
This commit is contained in:
parent
9086fa7771
commit
f122e56eda
1 changed files with 4 additions and 4 deletions
|
@ -25,9 +25,6 @@
|
|||
#include <scmconfig.h>
|
||||
#endif
|
||||
|
||||
#define malloc(size) (scm_must_malloc ((size), "alloca emulation"))
|
||||
extern char *scm_must_malloc ();
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
@ -207,7 +204,10 @@ alloca (size)
|
|||
/* Address of header. */
|
||||
|
||||
if (new == 0)
|
||||
abort();
|
||||
{
|
||||
write (2, "alloca emulation: out of memory\n", 32);
|
||||
abort();
|
||||
}
|
||||
|
||||
((header *) new)->h.next = last_alloca_header;
|
||||
((header *) new)->h.deep = depth;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue