mirror of
https://git.freebsd.org/ports.git
synced 2025-05-02 11:36:40 -04:00
unicode.c:1039:20: error: incompatible function pointer types passing 'VALUE (get_categories_param *)' (aka 'unsigned long (struct _get_categories_param *)') to parameter of type 'VALUE (*)(VALUE)' (aka 'unsigned long (*)(unsigned long)') [-Wincompatible-function-pointer-types] return rb_ensure(get_categories_internal, (VALUE)¶m, ^~~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/ruby-3.1/ruby/internal/iterator.h:425:25: note: passing argument to parameter 'b_proc' here VALUE rb_ensure(VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*e_proc)(VALUE), VALUE data2); ^ unicode.c:1040:20: error: incompatible function pointer types passing 'VALUE (WString *)' (aka 'unsigned long (struct _WString *)') to parameter of type 'VALUE (*)(VALUE)' (aka 'unsigned long (*)(unsigned long)') [-Wincompatible-function-pointer-types] get_categories_ensure, (VALUE)&wstr); ^~~~~~~~~~~~~~~~~~~~~ /usr/local/include/ruby-3.1/ruby/internal/iterator.h:425:62: note: passing argument to parameter 'e_proc' here VALUE rb_ensure(VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*e_proc)(VALUE), VALUE data2); ^ unicode.c:1057:20: error: incompatible function pointer types passing 'VALUE (get_categories_param *)' (aka 'unsigned long (struct _get_categories_param *)') to parameter of type 'VALUE (*)(VALUE)' (aka 'unsigned long (*)(unsigned long)') [-Wincompatible-function-pointer-types] return rb_ensure(get_categories_internal, (VALUE)¶m, ^~~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/ruby-3.1/ruby/internal/iterator.h:425:25: note: passing argument to parameter 'b_proc' here VALUE rb_ensure(VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*e_proc)(VALUE), VALUE data2); ^ unicode.c:1058:20: error: incompatible function pointer types passing 'VALUE (WString *)' (aka 'unsigned long (struct _WString *)') to parameter of type 'VALUE (*)(VALUE)' (aka 'unsigned long (*)(unsigned long)') [-Wincompatible-function-pointer-types] get_categories_ensure, (VALUE)&wstr); ^~~~~~~~~~~~~~~~~~~~~ /usr/local/include/ruby-3.1/ruby/internal/iterator.h:425:62: note: passing argument to parameter 'e_proc' here VALUE rb_ensure(VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*e_proc)(VALUE), VALUE data2); ^ unicode.c:1227:20: error: incompatible function pointer types passing 'VALUE (get_text_elements_param *)' (aka 'unsigned long (struct _get_text_elements_param *)') to parameter of type 'VALUE (*)(VALUE)' (aka 'unsigned long (*)(unsigned long)') [-Wincompatible-function-pointer-types] return rb_ensure(get_text_elements_internal, (VALUE)¶m, ^~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/ruby-3.1/ruby/internal/iterator.h:425:25: note: passing argument to parameter 'b_proc' here VALUE rb_ensure(VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*e_proc)(VALUE), VALUE data2); ^ unicode.c:1228:20: error: incompatible function pointer types passing 'VALUE (WString *)' (aka 'unsigned long (struct _WString *)') to parameter of type 'VALUE (*)(VALUE)' (aka 'unsigned long (*)(unsigned long)') [-Wincompatible-function-pointer-types] get_text_elements_ensure, (VALUE)&wstr); ^~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/ruby-3.1/ruby/internal/iterator.h:425:62: note: passing argument to parameter 'e_proc' here VALUE rb_ensure(VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*e_proc)(VALUE), VALUE data2); ^ 20 warnings and 6 errors generated.
35 lines
1.5 KiB
Text
35 lines
1.5 KiB
Text
--- ext/unicode/unicode.c.orig 2023-07-03 15:50:18 UTC
|
|
+++ ext/unicode/unicode.c
|
|
@@ -1036,8 +1036,8 @@ unicode_get_categories(VALUE obj, VALUE str)
|
|
#endif
|
|
WStr_allocWithUTF8L(&wstr, RSTRING_PTR(str), RSTRING_LEN(str));
|
|
|
|
- return rb_ensure(get_categories_internal, (VALUE)¶m,
|
|
- get_categories_ensure, (VALUE)&wstr);
|
|
+ return rb_ensure((VALUE (*)(VALUE)) get_categories_internal, (VALUE)¶m,
|
|
+ (VALUE (*)(VALUE)) get_categories_ensure, (VALUE)&wstr);
|
|
/* wstr will be freed in get_text_elements_ensure() */
|
|
}
|
|
|
|
@@ -1054,8 +1054,8 @@ unicode_get_abbr_categories(VALUE obj, VALUE str)
|
|
#endif
|
|
WStr_allocWithUTF8L(&wstr, RSTRING_PTR(str), RSTRING_LEN(str));
|
|
|
|
- return rb_ensure(get_categories_internal, (VALUE)¶m,
|
|
- get_categories_ensure, (VALUE)&wstr);
|
|
+ return rb_ensure((VALUE (*)(VALUE)) get_categories_internal, (VALUE)¶m,
|
|
+ (VALUE (*)(VALUE)) get_categories_ensure, (VALUE)&wstr);
|
|
/* wstr will be freed in get_text_elements_ensure() */
|
|
}
|
|
|
|
@@ -1224,8 +1224,8 @@ unicode_get_text_elements(VALUE obj, VALUE str)
|
|
#endif
|
|
WStr_allocWithUTF8L(&wstr, RSTRING_PTR(str), RSTRING_LEN(str));
|
|
|
|
- return rb_ensure(get_text_elements_internal, (VALUE)¶m,
|
|
- get_text_elements_ensure, (VALUE)&wstr);
|
|
+ return rb_ensure((VALUE (*)(VALUE)) get_text_elements_internal, (VALUE)¶m,
|
|
+ (VALUE (*)(VALUE)) get_text_elements_ensure, (VALUE)&wstr);
|
|
/* wstr will be freed in get_text_elements_ensure() */
|
|
}
|
|
|