зеркало из https://github.com/github/ruby.git
regparse.h: ANSI alias rule fix
* regparse.h (SET_NTYPE): get rid of breaking strict aliasing. patch by Zarko Todorovski in [ruby-core:71953]. [Bug #11790] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
6e6dcf2a6c
Коммит
1263f82a59
|
@ -1,3 +1,8 @@
|
|||
Wed Dec 9 17:02:03 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* regparse.h (SET_NTYPE): get rid of breaking strict aliasing.
|
||||
patch by Zarko Todorovski in [ruby-core:71953]. [Bug #11790]
|
||||
|
||||
Wed Dec 9 16:10:37 2015 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* vm.c (rb_vm_cref_in_context): Module#define_method in non-class
|
||||
|
|
|
@ -67,7 +67,11 @@ RUBY_SYMBOL_EXPORT_BEGIN
|
|||
BIT_NT_CANY | BIT_NT_BREF)) != 0)
|
||||
|
||||
#define NTYPE(node) ((node)->u.base.type)
|
||||
#define SET_NTYPE(node, ntype) (node)->u.base.type = (ntype)
|
||||
#define SET_NTYPE(node, ntype) \
|
||||
do { \
|
||||
int value = ntype; \
|
||||
memcpy(&((node)->u.base.type), &value, sizeof(int)); \
|
||||
} while (0)
|
||||
|
||||
#define NSTR(node) (&((node)->u.str))
|
||||
#define NCCLASS(node) (&((node)->u.cclass))
|
||||
|
|
Загрузка…
Ссылка в новой задаче