diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-06-04 11:01:04 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-06-04 11:01:04 +0900 |
| commit | 41f3456a282724808622dc2380322e17d6303c43 (patch) | |
| tree | 62a191f30275e138aa4bfc2f64b851744c2e68fe /include | |
| parent | 7a420d4bbad8b96902bb5ea0d5e303d797614f67 (diff) | |
| parent | 6af555b394234ba8f7038c9b8352b4467d53a529 (diff) | |
| download | mruby-41f3456a282724808622dc2380322e17d6303c43.tar.gz mruby-41f3456a282724808622dc2380322e17d6303c43.zip | |
Merge pull request #4865 from take-cheeze/istruct_align
Align RIStruct data for rational/complex
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby/istruct.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/mruby/istruct.h b/include/mruby/istruct.h index 45b1fadae..d6b6116a7 100644 --- a/include/mruby/istruct.h +++ b/include/mruby/istruct.h @@ -21,7 +21,10 @@ MRB_BEGIN_DECL struct RIStruct { MRB_OBJECT_HEADER; - char inline_data[ISTRUCT_DATA_SIZE]; + union { + intptr_t inline_alignment[3]; + char inline_data[ISTRUCT_DATA_SIZE]; + }; }; #define RISTRUCT(obj) ((struct RIStruct*)(mrb_ptr(obj))) |
