patch 9.1.1358: if_lua: compile warnings with gcc15
Commit:
https://github.com/vim/vim/commit/7292c0cb157621d6c0552a19a41b691ccd5b9ed4
Author: lilydjwg <[email protected]>
Date: Fri May 2 15:17:14 2025 +0200
patch 9.1.1358: if_lua: compile warnings with gcc15
Problem: if_lua: compile warnings with gcc15
Solution: update function prototypes (lilydjwg)
see also https://github.com/ruby/ruby/pull/13202.
closes: #17243
Signed-off-by: lilydjwg <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/src/if_ruby.c b/src/if_ruby.c
index a018dcde9..52f54f3df 100644
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -386,12 +386,12 @@ static void (*dll_rb_debug_rstring_null_ptr) (const
char*);
# endif
static VALUE (*dll_rb_define_class_under) (VALUE, const char*, VALUE);
static void (*dll_rb_define_const) (VALUE,const char*,VALUE);
-static void (*dll_rb_define_global_function) (const char*,VALUE(*)(),int);
-static void (*dll_rb_define_method) (VALUE,const char*,VALUE(*)(),int);
+static void (*dll_rb_define_global_function) (const
char*,VALUE(*)(int,VALUE*,VALUE),int);
+static void (*dll_rb_define_method) (VALUE,const char*,VALUE(*)(ANYARGS),int);
static VALUE (*dll_rb_define_module) (const char*);
-static void (*dll_rb_define_module_function) (VALUE,const
char*,VALUE(*)(),int);
-static void (*dll_rb_define_singleton_method) (VALUE,const
char*,VALUE(*)(),int);
-static void (*dll_rb_define_virtual_variable) (const
char*,VALUE(*)(),void(*)());
+static void (*dll_rb_define_module_function) (VALUE,const
char*,VALUE(*)(VALUE,VALUE),int);
+static void (*dll_rb_define_singleton_method) (VALUE,const
char*,VALUE(*)(ANYARGS),int);
+static void (*dll_rb_define_virtual_variable) (const
char*,VALUE(*)(ID,VALUE*),void(*)());
static VALUE *dll_rb_stdout;
static VALUE *dll_rb_stderr;
static VALUE *dll_rb_eArgError;
@@ -1720,10 +1720,10 @@ ruby_io_init(void)
rb_stdout = rb_obj_alloc(rb_cObject);
rb_stderr = rb_obj_alloc(rb_cObject);
- rb_define_singleton_method(rb_stdout, "write", vim_message, 1);
- rb_define_singleton_method(rb_stdout, "flush", f_nop, 0);
- rb_define_singleton_method(rb_stderr, "write", vim_message, 1);
- rb_define_singleton_method(rb_stderr, "flush", f_nop, 0);
+ rb_define_singleton_method(rb_stdout, "write", (void*)vim_message, 1);
+ rb_define_singleton_method(rb_stdout, "flush", (void*)f_nop, 0);
+ rb_define_singleton_method(rb_stderr, "write", (void*)vim_message, 1);
+ rb_define_singleton_method(rb_stderr, "flush", (void*)f_nop, 0);
rb_define_global_function("p", f_p, -1);
}
@@ -1757,36 +1757,36 @@ ruby_vim_init(void)
rb_eStandardError);
cBuffer = rb_define_class_under(mVIM, "Buffer", rb_cObject);
- rb_define_singleton_method(cBuffer, "current", buffer_s_current, 0);
- rb_define_singleton_method(cBuffer, "count", buffer_s_count, 0);
- rb_define_singleton_method(cBuffer, "[]", buffer_s_aref, 1);
- rb_define_method(cBuffer, "name", buffer_name, 0);
- rb_define_method(cBuffer, "number", buffer_number, 0);
- rb_define_method(cBuffer, "count", buffer_count, 0);
- rb_define_method(cBuffer, "length", buffer_count, 0);
- rb_define_method(cBuffer, "[]", buffer_aref, 1);
- rb_define_method(cBuffer, "[]=", buffer_aset, 2);
- rb_define_method(cBuffer, "delete", buffer_delete, 1);
- rb_define_method(cBuffer, "append", buffer_append, 2);
+ rb_define_singleton_method(cBuffer, "current", (void*)buffer_s_current, 0);
+ rb_define_singleton_method(cBuffer, "count", (void*)buffer_s_count, 0);
+ rb_define_singleton_method(cBuffer, "[]", (void*)buffer_s_aref, 1);
+ rb_define_method(cBuffer, "name", (void*)buffer_name, 0);
+ rb_define_method(cBuffer, "number", (void*)buffer_number, 0);
+ rb_define_method(cBuffer, "count", (void*)buffer_count, 0);
+ rb_define_method(cBuffer, "length", (void*)buffer_count, 0);
+ rb_define_method(cBuffer, "[]", (void*)buffer_aref, 1);
+ rb_define_method(cBuffer, "[]=", (void*)buffer_aset, 2);
+ rb_define_method(cBuffer, "delete", (void*)buffer_delete, 1);
+ rb_define_method(cBuffer, "append", (void*)buffer_append, 2);
// Added line manipulation functions
// SegPhault - 03/07/05
- rb_define_method(cBuffer, "line_number", current_line_number, 0);
- rb_define_method(cBuffer, "line", line_s_current, 0);
- rb_define_method(cBuffer, "line=", set_current_line, 1);
+ rb_define_method(cBuffer, "line_number", (void*)current_line_number, 0);
+ rb_define_method(cBuffer, "line", (void*)line_s_current, 0);
+ rb_define_method(cBuffer, "line=", (void*)set_current_line, 1);
cVimWindow = rb_define_class_under(mVIM, "Window", rb_cObject);
- rb_define_singleton_method(cVimWindow, "current", window_s_current, 0);
- rb_define_singleton_method(cVimWindow, "count", window_s_count, 0);
- rb_define_singleton_method(cVimWindow, "[]", window_s_aref, 1);
- rb_define_method(cVimWindow, "buffer", window_buffer, 0);
- rb_define_method(cVimWindow, "height", window_height, 0);
- rb_define_method(cVimWindow, "height=", window_set_height, 1);
- rb_define_method(cVimWindow, "width", window_width, 0);
- rb_define_method(cVimWindow, "width=", window_set_width, 1);
- rb_define_method(cVimWindow, "cursor", window_cursor, 0);
- rb_define_method(cVimWindow, "cursor=", window_set_cursor, 1);
+ rb_define_singleton_method(cVimWindow, "current", (void*)window_s_current,
0);
+ rb_define_singleton_method(cVimWindow, "count", (void*)window_s_count, 0);
+ rb_define_singleton_method(cVimWindow, "[]", (void*)window_s_aref, 1);
+ rb_define_method(cVimWindow, "buffer", (void*)window_buffer, 0);
+ rb_define_method(cVimWindow, "height", (void*)window_height, 0);
+ rb_define_method(cVimWindow, "height=", (void*)window_set_height, 1);
+ rb_define_method(cVimWindow, "width", (void*)window_width, 0);
+ rb_define_method(cVimWindow, "width=", (void*)window_set_width, 1);
+ rb_define_method(cVimWindow, "cursor", (void*)window_cursor, 0);
+ rb_define_method(cVimWindow, "cursor=", (void*)window_set_cursor, 1);
rb_define_virtual_variable("$curbuf", buffer_s_current_getter, 0);
rb_define_virtual_variable("$curwin", window_s_current_getter, 0);
diff --git a/src/version.c b/src/version.c
index 30a62c144..817398858 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1358,
/**/
1357,
/**/
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1uAqSr-003VpH-UW%40256bit.org.