Skip to content

Commit

Permalink
Remove suppressing deprecation warnings for io_open_descriptor_fallba…
Browse files Browse the repository at this point in the history
…ck and rb_io_closed_p_fallback
  • Loading branch information
andrykonchin committed Jan 15, 2025
1 parent e3618dc commit 6b9e8dc
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 6b9e8dc

Please sign in to comment.