summaryrefslogtreecommitdiff
path: root/time.c
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 /time.c
parentfefe37f98dc347ed372597975a327f3c1425c556 (diff)
downloadruby-a56d959ed5d99e602f2bb05bbeb46a1b1b146cd9.tar.gz
Replace `PACKED_STRUCT` and `PACKED_STRUCT_UNALIGNED`
Diffstat (limited to 'time.c')
-rw-r--r--time.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/time.c b/time.c
index 66c33f0f61..ff441232e2 100644
--- a/time.c
+++ b/time.c
@@ -1754,12 +1754,13 @@ localtimew(wideval_t timew, struct vtm *result)
#define TIME_TZMODE_FIXOFF 2
#define TIME_TZMODE_UNINITIALIZED 3
-PACKED_STRUCT_UNALIGNED(struct time_object {
+RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_BEGIN()
+struct time_object {
wideval_t timew; /* time_t value * TIME_SCALE. possibly Rational. */
struct vtm vtm;
unsigned int tzmode:3; /* 0:localtime 1:utc 2:fixoff 3:uninitialized */
unsigned int tm_got:1;
-});
+} RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_END();
#define GetTimeval(obj, tobj) ((tobj) = get_timeval(obj))
#define GetNewTimeval(obj, tobj) ((tobj) = get_new_timeval(obj))