comparison src/alloc.c @ 110480:5290c80fda43

Fix some uses of int instead of EMACS_INT. minibuf.c (Fminibuffer_contents) (Fminibuffer_contents_no_properties) (Fminibuffer_completion_contents): Use EMACS_INT for minibuffer positions. keyboard.c (command_loop_1): Use EMACS_INT to compare point with mark. alloc.c (make_uninit_string, make_uninit_multibyte_string) (allocate_string_data): Accept EMACS_INT for string length. editfns.c (Ffield_string, Ffield_string_no_properties) (make_buffer_string, make_buffer_string_both, Fbuffer_substring) (Fbuffer_substring_no_properties, find_field, Fdelete_field) (Ffield_string, Ffield_string_no_properties, Ffield_beginning) (Ffield_end): Use EMACS_INT for buffer positions. insdel.c (prepare_to_modify_buffer): Use EMACS_INT to compare point with mark. lisp.h (allocate_string_data, make_uninit_string) (make_uninit_multibyte_string, make_buffer_string) (make_buffer_string_both): Adjust prototypes.
author Eli Zaretskii <eliz@gnu.org>
date Wed, 22 Sep 2010 12:03:34 -0400
parents 5a7d60b243f4
children fda36a325177
comparison
equal deleted inserted replaced
110479:437c7aaf08fd 110480:5290c80fda43
1906 set S->data to its `u.data' member. Store a NUL byte at the end of 1906 set S->data to its `u.data' member. Store a NUL byte at the end of
1907 S->data. Set S->size to NCHARS and S->size_byte to NBYTES. Free 1907 S->data. Set S->size to NCHARS and S->size_byte to NBYTES. Free
1908 S->data if it was initially non-null. */ 1908 S->data if it was initially non-null. */
1909 1909
1910 void 1910 void
1911 allocate_string_data (struct Lisp_String *s, int nchars, int nbytes) 1911 allocate_string_data (struct Lisp_String *s,
1912 EMACS_INT nchars, EMACS_INT nbytes)
1912 { 1913 {
1913 struct sdata *data, *old_data; 1914 struct sdata *data, *old_data;
1914 struct sblock *b; 1915 struct sblock *b;
1915 int needed, old_nbytes; 1916 int needed, old_nbytes;
1916 1917
2410 2411
2411 /* Return an unibyte Lisp_String set up to hold LENGTH characters 2412 /* Return an unibyte Lisp_String set up to hold LENGTH characters
2412 occupying LENGTH bytes. */ 2413 occupying LENGTH bytes. */
2413 2414
2414 Lisp_Object 2415 Lisp_Object
2415 make_uninit_string (int length) 2416 make_uninit_string (EMACS_INT length)
2416 { 2417 {
2417 Lisp_Object val; 2418 Lisp_Object val;
2418 2419
2419 if (!length) 2420 if (!length)
2420 return empty_unibyte_string; 2421 return empty_unibyte_string;
2426 2427
2427 /* Return a multibyte Lisp_String set up to hold NCHARS characters 2428 /* Return a multibyte Lisp_String set up to hold NCHARS characters
2428 which occupy NBYTES bytes. */ 2429 which occupy NBYTES bytes. */
2429 2430
2430 Lisp_Object 2431 Lisp_Object
2431 make_uninit_multibyte_string (int nchars, int nbytes) 2432 make_uninit_multibyte_string (EMACS_INT nchars, EMACS_INT nbytes)
2432 { 2433 {
2433 Lisp_Object string; 2434 Lisp_Object string;
2434 struct Lisp_String *s; 2435 struct Lisp_String *s;
2435 2436
2436 if (nchars < 0) 2437 if (nchars < 0)