aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorStefan Monnier2011-02-11 21:27:53 -0500
committerStefan Monnier2011-02-11 21:27:53 -0500
commitc530e1c2a3a036d71942c354ba11b30a06341fd7 (patch)
tree184fa6b6c9bb58855aa9f1ae6cded97edc4f10fb /src/alloc.c
parent295fb2ac59b66c0e2470325a42c8e58c135ed044 (diff)
parente0e36cac4adaa32ad755a34c811366dd8e4655bc (diff)
downloademacs-c530e1c2a3a036d71942c354ba11b30a06341fd7.tar.gz
emacs-c530e1c2a3a036d71942c354ba11b30a06341fd7.zip
Merge from trunk
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 990622a30f6..36c849418f3 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -2281,7 +2281,8 @@ make_string (const char *contents, EMACS_INT nbytes)
2281 register Lisp_Object val; 2281 register Lisp_Object val;
2282 EMACS_INT nchars, multibyte_nbytes; 2282 EMACS_INT nchars, multibyte_nbytes;
2283 2283
2284 parse_str_as_multibyte (contents, nbytes, &nchars, &multibyte_nbytes); 2284 parse_str_as_multibyte ((const unsigned char *) contents, nbytes,
2285 &nchars, &multibyte_nbytes);
2285 if (nbytes == nchars || nbytes != multibyte_nbytes) 2286 if (nbytes == nchars || nbytes != multibyte_nbytes)
2286 /* CONTENTS contains no multibyte sequences or contains an invalid 2287 /* CONTENTS contains no multibyte sequences or contains an invalid
2287 multibyte sequence. We must make unibyte string. */ 2288 multibyte sequence. We must make unibyte string. */
@@ -2349,7 +2350,8 @@ make_specified_string (const char *contents,
2349 if (nchars < 0) 2350 if (nchars < 0)
2350 { 2351 {
2351 if (multibyte) 2352 if (multibyte)
2352 nchars = multibyte_chars_in_text (contents, nbytes); 2353 nchars = multibyte_chars_in_text ((const unsigned char *) contents,
2354 nbytes);
2353 else 2355 else
2354 nchars = nbytes; 2356 nchars = nbytes;
2355 } 2357 }
@@ -4707,7 +4709,7 @@ make_pure_string (const char *data,
4707 struct Lisp_String *s; 4709 struct Lisp_String *s;
4708 4710
4709 s = (struct Lisp_String *) pure_alloc (sizeof *s, Lisp_String); 4711 s = (struct Lisp_String *) pure_alloc (sizeof *s, Lisp_String);
4710 s->data = find_string_data_in_pure (data, nbytes); 4712 s->data = (unsigned char *) find_string_data_in_pure (data, nbytes);
4711 if (s->data == NULL) 4713 if (s->data == NULL)
4712 { 4714 {
4713 s->data = (unsigned char *) pure_alloc (nbytes + 1, -1); 4715 s->data = (unsigned char *) pure_alloc (nbytes + 1, -1);