diff options
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/alloc.c b/src/alloc.c index 0fc79fe68ac..f479226845a 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -2298,11 +2298,13 @@ string_overflow (void) | |||
| 2298 | error ("Maximum string size exceeded"); | 2298 | error ("Maximum string size exceeded"); |
| 2299 | } | 2299 | } |
| 2300 | 2300 | ||
| 2301 | DEFUN ("make-string", Fmake_string, Smake_string, 2, 2, 0, | 2301 | DEFUN ("make-string", Fmake_string, Smake_string, 2, 3, 0, |
| 2302 | doc: /* Return a newly created string of length LENGTH, with INIT in each element. | 2302 | doc: /* Return a newly created string of length LENGTH, with INIT in each element. |
| 2303 | LENGTH must be an integer. | 2303 | LENGTH must be an integer. |
| 2304 | INIT must be an integer that represents a character. */) | 2304 | INIT must be an integer that represents a character. |
| 2305 | (Lisp_Object length, Lisp_Object init) | 2305 | If optional argument MULTIBYTE is non-nil, the result will be |
| 2306 | a multibyte string even if INIT is an ASCII character. */) | ||
| 2307 | (Lisp_Object length, Lisp_Object init, Lisp_Object multibyte) | ||
| 2306 | { | 2308 | { |
| 2307 | register Lisp_Object val; | 2309 | register Lisp_Object val; |
| 2308 | int c; | 2310 | int c; |
| @@ -2312,7 +2314,7 @@ INIT must be an integer that represents a character. */) | |||
| 2312 | CHECK_CHARACTER (init); | 2314 | CHECK_CHARACTER (init); |
| 2313 | 2315 | ||
| 2314 | c = XFASTINT (init); | 2316 | c = XFASTINT (init); |
| 2315 | if (ASCII_CHAR_P (c)) | 2317 | if (ASCII_CHAR_P (c) && NILP (multibyte)) |
| 2316 | { | 2318 | { |
| 2317 | nbytes = XINT (length); | 2319 | nbytes = XINT (length); |
| 2318 | val = make_uninit_string (nbytes); | 2320 | val = make_uninit_string (nbytes); |
| @@ -3930,7 +3932,7 @@ make_event_array (ptrdiff_t nargs, Lisp_Object *args) | |||
| 3930 | { | 3932 | { |
| 3931 | Lisp_Object result; | 3933 | Lisp_Object result; |
| 3932 | 3934 | ||
| 3933 | result = Fmake_string (make_number (nargs), make_number (0)); | 3935 | result = Fmake_string (make_number (nargs), make_number (0), Qnil); |
| 3934 | for (i = 0; i < nargs; i++) | 3936 | for (i = 0; i < nargs; i++) |
| 3935 | { | 3937 | { |
| 3936 | SSET (result, i, XINT (args[i])); | 3938 | SSET (result, i, XINT (args[i])); |