1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Pack struct rb_strterm_heredoc_struct on 32-bit platforms

This commit is contained in:
Nobuyoshi Nakada 2019-05-16 18:24:12 +09:00
parent 88449100bc
commit 0ed9bdfc13
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -622,8 +622,13 @@ struct rb_strterm_heredoc_struct {
# define HERETERM_LENGTH_MAX UINT_MAX # define HERETERM_LENGTH_MAX UINT_MAX
#endif #endif
; ;
#if HERETERM_LENGTH_BITS < SIZEOF_INT * CHAR_BIT
unsigned quote: 1; unsigned quote: 1;
unsigned func: 8;
#else
uint8_t quote;
uint8_t func; uint8_t func;
#endif
}; };
STATIC_ASSERT(rb_strterm_heredoc_t, sizeof(rb_strterm_heredoc_t) <= 4 * SIZEOF_VALUE); STATIC_ASSERT(rb_strterm_heredoc_t, sizeof(rb_strterm_heredoc_t) <= 4 * SIZEOF_VALUE);