summaryrefslogtreecommitdiff
path: root/timev.h
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-02-08 12:21:58 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-02-08 12:35:27 +0900
commita56d959ed5d99e602f2bb05bbeb46a1b1b146cd9 (patch)
tree3ee25a2bee4c1ac743bc86095471d7b1242f2243 /timev.h
parentfefe37f98dc347ed372597975a327f3c1425c556 (diff)
Replace `PACKED_STRUCT` and `PACKED_STRUCT_UNALIGNED`
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/7268
Diffstat (limited to 'timev.h')
-rw-r--r--timev.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/timev.h b/timev.h
index af97ed95b5..d667b60b14 100644
--- a/timev.h
+++ b/timev.h
@@ -2,10 +2,8 @@
#define RUBY_TIMEV_H
#include "ruby/ruby.h"
-#if 0
-struct vtm {/* dummy for TAGS */};
-#endif
-PACKED_STRUCT_UNALIGNED(struct vtm {
+RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_BEGIN()
+struct vtm {
VALUE year; /* 2000 for example. Integer. */
VALUE subsecx; /* 0 <= subsecx < TIME_SCALE. possibly Rational. */
VALUE utc_offset; /* -3600 as -01:00 for example. possibly Rational. */
@@ -18,7 +16,7 @@ PACKED_STRUCT_UNALIGNED(struct vtm {
unsigned int sec:6; /* 0..60 */
unsigned int wday:3; /* 0:Sunday, 1:Monday, ..., 6:Saturday 7:init */
unsigned int isdst:2; /* 0:StandardTime 1:DayLightSavingTime 3:init */
-});
+} RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_END();
#define TIME_SCALE 1000000000