summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-02-06 21:56:04 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-02-08 12:35:27 +0900
commitfefe37f98dc347ed372597975a327f3c1425c556 (patch)
treed1b6cea16ec4488bb612b5c3025574a6be2419d9 /include
parent899ea35035c5bfb78fcdbc9fbfaafba24aee49c1 (diff)
downloadruby-fefe37f98dc347ed372597975a327f3c1425c556.tar.gz
Replace `PACKED_STRUCT` in include
Diffstat (limited to 'include')
-rw-r--r--include/ruby/io.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/ruby/io.h b/include/ruby/io.h
index 88029b1bb9..8be83a215c 100644
--- a/include/ruby/io.h
+++ b/include/ruby/io.h
@@ -49,11 +49,11 @@
/** @endcond */
#include "ruby/internal/attr/const.h"
+#include "ruby/internal/attr/packed_struct.h"
#include "ruby/internal/attr/pure.h"
#include "ruby/internal/attr/noreturn.h"
#include "ruby/internal/dllexport.h"
#include "ruby/internal/value.h"
-#include "ruby/backward/2/attributes.h" /* PACKED_STRUCT_UNALIGNED */
// IO#wait, IO#wait_readable, IO#wait_writable, IO#wait_priority are defined by this implementation.
#define RUBY_IO_WAIT_METHODS
@@ -88,7 +88,8 @@ typedef enum {
* IO buffers. This is an implementation detail of ::rb_io_t::wbuf and
* ::rb_io_t::rbuf. People don't manipulate it directly.
*/
-PACKED_STRUCT_UNALIGNED(struct rb_io_buffer_t {
+RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_BEGIN()
+struct rb_io_buffer_t {
/** Pointer to the underlying memory region, of at least `capa` bytes. */
char *ptr; /* off + len <= capa */
@@ -101,7 +102,7 @@ PACKED_STRUCT_UNALIGNED(struct rb_io_buffer_t {
/** Designed capacity of the buffer. */
int capa;
-});
+} RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_END();
/** @alias{rb_io_buffer_t} */
typedef struct rb_io_buffer_t rb_io_buffer_t;