mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Prefer rb_gc_register_mark_object
* ext/openssl/ossl_asn1.c (Init_ossl_asn1): prefer `rb_gc_register_mark_object`, which is better for constant objects, over `rb_gc_register_address` for global/static variables which can be re-assigned at runtime. [Bug #16196]
This commit is contained in:
parent
0131fab749
commit
9c0cd5c569
1 changed files with 1 additions and 1 deletions
|
@ -1823,8 +1823,8 @@ do{\
|
|||
rb_define_method(cASN1EndOfContent, "initialize", ossl_asn1eoc_initialize, 0);
|
||||
rb_define_method(cASN1EndOfContent, "to_der", ossl_asn1eoc_to_der, 0);
|
||||
|
||||
rb_global_variable(&class_tag_map);
|
||||
class_tag_map = rb_hash_new();
|
||||
rb_gc_register_mark_object(class_tag_map);
|
||||
rb_hash_aset(class_tag_map, cASN1EndOfContent, INT2NUM(V_ASN1_EOC));
|
||||
rb_hash_aset(class_tag_map, cASN1Boolean, INT2NUM(V_ASN1_BOOLEAN));
|
||||
rb_hash_aset(class_tag_map, cASN1Integer, INT2NUM(V_ASN1_INTEGER));
|
||||
|
|
Loading…
Add table
Reference in a new issue