diff options
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/alloc.c b/src/alloc.c index a5c2e20d0c9..52d683a1b67 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -5212,15 +5212,14 @@ make_pure_string (const char *data, | |||
| 5212 | return string; | 5212 | return string; |
| 5213 | } | 5213 | } |
| 5214 | 5214 | ||
| 5215 | /* Return a string a string allocated in pure space. Do not allocate | 5215 | /* Return a string allocated in pure space. Do not |
| 5216 | the string data, just point to DATA. */ | 5216 | allocate the string data, just point to DATA. */ |
| 5217 | 5217 | ||
| 5218 | Lisp_Object | 5218 | Lisp_Object |
| 5219 | make_pure_c_string (const char *data) | 5219 | make_pure_c_string (const char *data, ptrdiff_t nchars) |
| 5220 | { | 5220 | { |
| 5221 | Lisp_Object string; | 5221 | Lisp_Object string; |
| 5222 | struct Lisp_String *s; | 5222 | struct Lisp_String *s; |
| 5223 | ptrdiff_t nchars = strlen (data); | ||
| 5224 | 5223 | ||
| 5225 | s = (struct Lisp_String *) pure_alloc (sizeof *s, Lisp_String); | 5224 | s = (struct Lisp_String *) pure_alloc (sizeof *s, Lisp_String); |
| 5226 | s->size = nchars; | 5225 | s->size = nchars; |
| @@ -6842,7 +6841,7 @@ do hash-consing of the objects allocated to pure space. */); | |||
| 6842 | not be able to allocate the memory to hold it. */ | 6841 | not be able to allocate the memory to hold it. */ |
| 6843 | Vmemory_signal_data | 6842 | Vmemory_signal_data |
| 6844 | = pure_cons (Qerror, | 6843 | = pure_cons (Qerror, |
| 6845 | pure_cons (make_pure_c_string ("Memory exhausted--use M-x save-some-buffers then exit and restart Emacs"), Qnil)); | 6844 | pure_cons (build_pure_c_string ("Memory exhausted--use M-x save-some-buffers then exit and restart Emacs"), Qnil)); |
| 6846 | 6845 | ||
| 6847 | DEFVAR_LISP ("memory-full", Vmemory_full, | 6846 | DEFVAR_LISP ("memory-full", Vmemory_full, |
| 6848 | doc: /* Non-nil means Emacs cannot get much more Lisp memory. */); | 6847 | doc: /* Non-nil means Emacs cannot get much more Lisp memory. */); |