Skip to content

Compilation error in Ruby 3.5.0-preview1 #130

Closed
@everton

Description

@everton

I'm getting compilation errors while compiling stringio-3.1.6 with the latest release (3.5.0-preview1).

(Compiling via rbenv, in a Debian machine)

compiling stringio.c
stringio.c: In function ‘strio_init’:
stringio.c:297:52: error: passing argument 5 of ‘rb_io_extract_modeenc’ from incompatible pointer type [-Wincompatible-pointer-types]
  297 |     rb_io_extract_modeenc(&vmode, 0, opt, &oflags, &ptr->flags, &convconfig);
      |                                                    ^~~~~~~~~~~
      |                                                    |
      |                                                    int *
In file included from stringio.c:21:
/home/everton/.rbenv/versions/3.5.0-preview1/include/ruby-3.5.0+0/ruby/io.h:877:107: note: expected ‘enum rb_io_mode *’ but argument is of type ‘int *’
  877 | void rb_io_extract_modeenc(VALUE *vmode_p, VALUE *vperm_p, VALUE opthash, int *oflags_p, enum rb_io_mode *fmode_p, rb_io_enc_t *convconfig_p);
      |                                                                                          ~~~~~~~~~~~~~~~~~^~~~~~~
stringio.c: In function ‘strio_set_encoding’:
stringio.c:1857:61: error: passing argument 5 of ‘rb_io_extract_modeenc’ from incompatible pointer type [-Wincompatible-pointer-types]
 1857 |             rb_io_extract_modeenc(&vmode, 0, Qnil, &oflags, &fmode, &convconfig);
      |                                                             ^~~~~~
      |                                                             |
      |                                                             int *
/home/everton/.rbenv/versions/3.5.0-preview1/include/ruby-3.5.0+0/ruby/io.h:877:107: note: expected ‘enum rb_io_mode *’ but argument is of type ‘int *’
  877 | void rb_io_extract_modeenc(VALUE *vmode_p, VALUE *vperm_p, VALUE opthash, int *oflags_p, enum rb_io_mode *fmode_p, rb_io_enc_t *convconfig_p);
      |                                                                                          ~~~~~~~~~~~~~~~~~^~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions