diff options
author | Jim Blandy <jimb@red-bean.com> | 1998-10-03 19:51:05 +0000 |
---|---|---|
committer | Jim Blandy <jimb@red-bean.com> | 1998-10-03 19:51:05 +0000 |
commit | ce6ed4bae6367d6b6ee840b7c0461865ace15dd8 (patch) | |
tree | b09478e1d82946585230c47f6df8f6c27e96e3af | |
parent | 48ca6468ab072a6e866ee4a2037d998aa61e0c5d (diff) | |
download | guile-ce6ed4bae6367d6b6ee840b7c0461865ace15dd8.tar.gz |
* alloca.c: Use scm_must_malloc to obtain storage. Hopefully this
works; I can't conveniently test it myself. (Thanks to Dvid
Tillman for the bug report.)
-rw-r--r-- | libguile/alloca.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/libguile/alloca.c b/libguile/alloca.c index 25b0ab498..b36c32aec 100644 --- a/libguile/alloca.c +++ b/libguile/alloca.c @@ -25,6 +25,9 @@ #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 @@ -77,21 +80,6 @@ typedef char *pointer; #define NULL 0 #endif -/* Different portions of Emacs need to call different versions of - malloc. The Emacs executable needs alloca to call xmalloc, because - ordinary malloc isn't protected from input signals. On the other - hand, the utilities in lib-src need alloca to call malloc; some of - them are very simple, and don't have an xmalloc routine. - - Non-Emacs programs expect this to call use xmalloc. - - Callers below should use malloc. */ - -#ifndef emacs -#define malloc xmalloc -#endif -extern pointer malloc (); - /* Define STACK_DIRECTION if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. |