Mercurial > emacs
comparison src/alloc.c @ 109353:d43e7dfda4f1
merge trunk
| author | Kenichi Handa <handa@etlken> |
|---|---|
| date | Mon, 12 Jul 2010 11:28:50 +0900 |
| parents | a0d2db31314d |
| children | d12162869c07 |
comparison
equal
deleted
inserted
replaced
| 109352:2803d726899d | 109353:d43e7dfda4f1 |
|---|---|
| 20 | 20 |
| 21 #include <config.h> | 21 #include <config.h> |
| 22 #include <stdio.h> | 22 #include <stdio.h> |
| 23 #include <limits.h> /* For CHAR_BIT. */ | 23 #include <limits.h> /* For CHAR_BIT. */ |
| 24 #include <setjmp.h> | 24 #include <setjmp.h> |
| 25 | |
| 26 #ifdef STDC_HEADERS | |
| 27 #include <stddef.h> /* For offsetof, used by PSEUDOVECSIZE. */ | |
| 28 #endif | |
| 29 | 25 |
| 30 #ifdef ALLOC_DEBUG | 26 #ifdef ALLOC_DEBUG |
| 31 #undef INLINE | 27 #undef INLINE |
| 32 #endif | 28 #endif |
| 33 | 29 |
| 296 static EMACS_INT pure_bytes_used_non_lisp; | 292 static EMACS_INT pure_bytes_used_non_lisp; |
| 297 | 293 |
| 298 /* If nonzero, this is a warning delivered by malloc and not yet | 294 /* If nonzero, this is a warning delivered by malloc and not yet |
| 299 displayed. */ | 295 displayed. */ |
| 300 | 296 |
| 301 char *pending_malloc_warning; | 297 const char *pending_malloc_warning; |
| 302 | 298 |
| 303 /* Pre-computed signal argument for use when memory is exhausted. */ | 299 /* Pre-computed signal argument for use when memory is exhausted. */ |
| 304 | 300 |
| 305 Lisp_Object Vmemory_signal_data; | 301 Lisp_Object Vmemory_signal_data; |
| 306 | 302 |
| 512 ************************************************************************/ | 508 ************************************************************************/ |
| 513 | 509 |
| 514 /* Function malloc calls this if it finds we are near exhausting storage. */ | 510 /* Function malloc calls this if it finds we are near exhausting storage. */ |
| 515 | 511 |
| 516 void | 512 void |
| 517 malloc_warning (char *str) | 513 malloc_warning (const char *str) |
| 518 { | 514 { |
| 519 pending_malloc_warning = str; | 515 pending_malloc_warning = str; |
| 520 } | 516 } |
| 521 | 517 |
| 522 | 518 |
| 3028 if (!NILP (Vpurify_flag)) | 3024 if (!NILP (Vpurify_flag)) |
| 3029 val = make_pure_vector ((EMACS_INT) nargs); | 3025 val = make_pure_vector ((EMACS_INT) nargs); |
| 3030 else | 3026 else |
| 3031 val = Fmake_vector (len, Qnil); | 3027 val = Fmake_vector (len, Qnil); |
| 3032 | 3028 |
| 3033 if (STRINGP (args[1]) && STRING_MULTIBYTE (args[1])) | 3029 if (nargs > 1 && STRINGP (args[1]) && STRING_MULTIBYTE (args[1])) |
| 3034 /* BYTECODE-STRING must have been produced by Emacs 20.2 or the | 3030 /* BYTECODE-STRING must have been produced by Emacs 20.2 or the |
| 3035 earlier because they produced a raw 8-bit string for byte-code | 3031 earlier because they produced a raw 8-bit string for byte-code |
| 3036 and now such a byte-code string is loaded as multibyte while | 3032 and now such a byte-code string is loaded as multibyte while |
| 3037 raw 8-bit characters converted to multibyte form. Thus, now we | 3033 raw 8-bit characters converted to multibyte form. Thus, now we |
| 3038 must convert them back to the original unibyte form. */ | 3034 must convert them back to the original unibyte form. */ |
