Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / ruby-modules / gem-config / iconv-fix-incompatible-function-pointer-conversions.patch
blob1cc38cbae135700a14a9d1e44bc69871b8023978
1 diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
2 index 2801049..77fae7e 100644
3 --- a/ext/iconv/iconv.c
4 +++ b/ext/iconv/iconv.c
5 @@ -188,7 +188,7 @@ static VALUE iconv_convert _((iconv_t cd, VALUE str, long start, long length, in
6 static VALUE iconv_s_allocate _((VALUE klass));
7 static VALUE iconv_initialize _((int argc, VALUE *argv, VALUE self));
8 static VALUE iconv_s_open _((int argc, VALUE *argv, VALUE self));
9 -static VALUE iconv_s_convert _((struct iconv_env_t* env));
10 +static VALUE iconv_s_convert _((VALUE env));
11 static VALUE iconv_s_iconv _((int argc, VALUE *argv, VALUE self));
12 static VALUE iconv_init_state _((VALUE cd));
13 static VALUE iconv_finish _((VALUE self));
14 @@ -204,7 +204,7 @@ static VALUE charset_map;
15 * Returns the map from canonical name to system dependent name.
17 static VALUE
18 -charset_map_get(void)
19 +charset_map_get(VALUE klass)
21 return charset_map;
23 @@ -642,7 +642,7 @@ iconv_s_allocate(VALUE klass)
26 static VALUE
27 -get_iconv_opt_i(VALUE i, VALUE arg)
28 +get_iconv_opt_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, arg))
30 VALUE name;
31 #if defined ICONV_SET_TRANSLITERATE || defined ICONV_SET_DISCARD_ILSEQ
32 @@ -784,8 +784,9 @@ iconv_s_open(int argc, VALUE *argv, VALUE self)
35 static VALUE
36 -iconv_s_convert(struct iconv_env_t* env)
37 +iconv_s_convert(VALUE env_value)
39 + struct iconv_env_t* env = (struct iconv_env_t*)env_value;
40 VALUE last = 0;
42 for (; env->argc > 0; --env->argc, ++env->argv) {
43 @@ -906,7 +907,7 @@ list_iconv(unsigned int namescount, const char *const *names, void *data)
45 #if defined(HAVE_ICONVLIST) || defined(HAVE___ICONV_FREE_LIST)
46 static VALUE
47 -iconv_s_list(void)
48 +iconv_s_list(VALUE klass)
50 #ifdef HAVE_ICONVLIST
51 int state;