[ruby-cvs:57794] normal:r50646 (trunk): openssl: use RB_GC_GUARD instead of volatile
normal at ruby-lang.org
normal at ruby-lang.org
Wed May 27 10:09:12 JST 2015
normal 2015-05-27 10:09:11 +0900 (Wed, 27 May 2015)
New Revision: 50646
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50646
Log:
openssl: use RB_GC_GUARD instead of volatile
From doc/extension.rdoc:
>
> Using the RB_GC_GUARD macro is preferable to using the "volatile"
> keyword in C. RB_GC_GUARD has the following advantages:
>
> 1) the intent of the macro use is clear
>
> 2) RB_GC_GUARD only affects its call site, "volatile" generates some
> extra code every time the variable is used, hurting optimization.
>
> 3) "volatile" implementations may be buggy/inconsistent in some
> compilers and architectures. RB_GC_GUARD is customizable for broken
> systems/compilers without those without negatively affecting other
> systems.
* ext/openssl/ossl_asn1.c (ossl_asn1_traverse, ossl_asn1_decode,
ossl_asn1_decode_all): use RB_GC_GUARD instead of volatile
[ruby-core:69371] [Bug #11185]
Modified files:
trunk/ChangeLog
trunk/ext/openssl/ossl_asn1.c
More information about the ruby-cvs
mailing list