diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-02-08 12:21:58 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-02-08 12:35:27 +0900 |
commit | a56d959ed5d99e602f2bb05bbeb46a1b1b146cd9 (patch) | |
tree | 3ee25a2bee4c1ac743bc86095471d7b1242f2243 /time.c | |
parent | fefe37f98dc347ed372597975a327f3c1425c556 (diff) |
Replace `PACKED_STRUCT` and `PACKED_STRUCT_UNALIGNED`
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7268
Diffstat (limited to 'time.c')
-rw-r--r-- | time.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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)) |