Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
cca94728
Commit
cca94728
authored
Feb 06, 2011
by
Paul Eggert
Browse files
Merge: * alloc.c: conform to C89 pointer rules
parents
ed98055e
90256841
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
src/ChangeLog
src/ChangeLog
+2
-0
src/alloc.c
src/alloc.c
+5
-3
No files found.
src/ChangeLog
View file @
cca94728
...
...
@@ -7,6 +7,8 @@
rules about pointer type compatibility.
* casefiddle.c (casify_object, casify_region): Likewise.
* search.c (Freplace_match, Fregexp_quote): Likewise.
* alloc.c (make_string, make_specified_string, make_pure_string):
Likewise.
2011-02-06 Paul Eggert <eggert@cs.ucla.edu>
src/alloc.c
View file @
cca94728
...
...
@@ -2281,7 +2281,8 @@ make_string (const char *contents, EMACS_INT nbytes)
register
Lisp_Object
val
;
EMACS_INT
nchars
,
multibyte_nbytes
;
parse_str_as_multibyte
(
contents
,
nbytes
,
&
nchars
,
&
multibyte_nbytes
);
parse_str_as_multibyte
((
const
unsigned
char
*
)
contents
,
nbytes
,
&
nchars
,
&
multibyte_nbytes
);
if
(
nbytes
==
nchars
||
nbytes
!=
multibyte_nbytes
)
/* CONTENTS contains no multibyte sequences or contains an invalid
multibyte sequence. We must make unibyte string. */
...
...
@@ -2349,7 +2350,8 @@ make_specified_string (const char *contents,
if
(
nchars
<
0
)
{
if
(
multibyte
)
nchars
=
multibyte_chars_in_text
(
contents
,
nbytes
);
nchars
=
multibyte_chars_in_text
((
const
unsigned
char
*
)
contents
,
nbytes
);
else
nchars
=
nbytes
;
}
...
...
@@ -4650,7 +4652,7 @@ make_pure_string (const char *data,
struct
Lisp_String
*
s
;
s
=
(
struct
Lisp_String
*
)
pure_alloc
(
sizeof
*
s
,
Lisp_String
);
s
->
data
=
find_string_data_in_pure
(
data
,
nbytes
);
s
->
data
=
(
unsigned
char
*
)
find_string_data_in_pure
(
data
,
nbytes
);
if
(
s
->
data
==
NULL
)
{
s
->
data
=
(
unsigned
char
*
)
pure_alloc
(
nbytes
+
1
,
-
1
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment