diff options
author | Nobuyoshi Nakada <[email protected]> | 2023-02-08 12:21:58 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2023-02-08 12:35:27 +0900 |
commit | a56d959ed5d99e602f2bb05bbeb46a1b1b146cd9 (patch) | |
tree | 3ee25a2bee4c1ac743bc86095471d7b1242f2243 /timev.h | |
parent | fefe37f98dc347ed372597975a327f3c1425c556 (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.h | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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 |