Skip to content

Commit

Permalink
[GR-59866] Follow up for PR "Add missing io-related functions"
Browse files Browse the repository at this point in the history
PullRequest: truffleruby/4452
  • Loading branch information
andrykonchin authored and eregon committed Jan 16, 2025
2 parents 3c9adb4 + 6b9e8dc commit f646119
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion lib/cext/ABI_check.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6
7
8 changes: 0 additions & 8 deletions src/main/c/io-console/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -1390,9 +1390,6 @@ console_clear_screen(VALUE io)
}

#ifndef HAVE_RB_IO_OPEN_DESCRIPTOR
// Suppress deprecation for rb_io_t fields, it is used because we don't have rb_io_open_descriptor() yet
RBIMPL_WARNING_PUSH()
RBIMPL_WARNING_IGNORED(-Wdeprecated-declarations)
static VALUE
io_open_descriptor_fallback(VALUE klass, int descriptor, int mode, VALUE path, VALUE timeout, void *encoding)
{
Expand All @@ -1413,21 +1410,16 @@ io_open_descriptor_fallback(VALUE klass, int descriptor, int mode, VALUE path, V
return self;
}
#define rb_io_open_descriptor io_open_descriptor_fallback
RBIMPL_WARNING_POP()
#endif

#ifndef HAVE_RB_IO_CLOSED_P
// Suppress deprecation for rb_io_t fields, it is used because we don't have rb_io_closed_p() yet
RBIMPL_WARNING_PUSH()
RBIMPL_WARNING_IGNORED(-Wdeprecated-declarations)
static VALUE
rb_io_closed_p_fallback(VALUE io)
{
rb_io_t *fptr = RFILE(io)->fptr;
return fptr->fd == -1 ? Qtrue : Qfalse;
}
#define rb_io_closed_p rb_io_closed_p_fallback
RBIMPL_WARNING_POP()
#endif

/*
Expand Down

0 comments on commit f646119

Please sign in to comment.