summaryrefslogtreecommitdiff
path: root/src/proto/misc2.pro
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-05-24 18:54:09 +0200
committerBram Moolenaar <Bram@vim.org>2019-05-24 18:54:09 +0200
commit964b3746b9c81e65887e2ac9a335f181db2bb592 (patch)
tree9afaaac41a1c4f71b359fd6706b88df00e22e7a1 /src/proto/misc2.pro
parentd33a764123a8aedb20cd84aeff3b94810ee67c4c (diff)
downloadvim-git-964b3746b9c81e65887e2ac9a335f181db2bb592.tar.gz
patch 8.1.1384: using "int" for alloc() often results in compiler warningsv8.1.1384
Problem: Using "int" for alloc() often results in compiler warnings. Solution: Use "size_t" and remove type casts. Remove alloc_check(), Vim only works with 32 bit ints anyway.
Diffstat (limited to 'src/proto/misc2.pro')
-rw-r--r--src/proto/misc2.pro21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/proto/misc2.pro b/src/proto/misc2.pro
index 566c97309..687cfedaf 100644
--- a/src/proto/misc2.pro
+++ b/src/proto/misc2.pro
@@ -20,21 +20,20 @@ void check_cursor(void);
void adjust_cursor_col(void);
int leftcol_changed(void);
void vim_mem_profile_dump(void);
-int alloc_does_fail(long_u size);
-char_u *alloc(unsigned size);
-char_u *alloc_id(unsigned size, alloc_id_T id);
-char_u *alloc_clear(unsigned size);
-char_u *alloc_clear_id(unsigned size, alloc_id_T id);
-char_u *alloc_check(unsigned size);
-char_u *lalloc_clear(long_u size, int message);
-char_u *lalloc(long_u size, int message);
-char_u *lalloc_id(long_u size, int message, alloc_id_T id);
+int alloc_does_fail(size_t size);
+char_u *alloc(size_t size);
+char_u *alloc_id(size_t size, alloc_id_T id);
+char_u *alloc_clear(size_t size);
+char_u *alloc_clear_id(size_t size, alloc_id_T id);
+char_u *lalloc_clear(size_t size, int message);
+char_u *lalloc(size_t size, int message);
+char_u *lalloc_id(size_t size, int message, alloc_id_T id);
void *mem_realloc(void *ptr, size_t size);
-void do_outofmem_msg(long_u size);
+void do_outofmem_msg(size_t size);
void free_all_mem(void);
char_u *vim_strsave(char_u *string);
char_u *vim_strnsave(char_u *string, int len);
-char_u *vim_memsave(char_u *p, int len);
+char_u *vim_memsave(char_u *p, size_t len);
char_u *vim_strsave_escaped(char_u *string, char_u *esc_chars);
char_u *vim_strsave_escaped_ext(char_u *string, char_u *esc_chars, int cc, int bsl);
int csh_like_shell(void);