mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/openssl/ossl_asn1.c(ossl_asn1_default_tag): avoid using RCLASS_SUPER
to make it compilable. Plus, tabify and change variable definition style. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
70b4b6dc8b
commit
75431b924c
2 changed files with 13 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Sun May 22 18:59:27 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
|
||||||
|
|
||||||
|
* ext/openssl/ossl_asn1.c(ossl_asn1_default_tag): avoid using RCLASS_SUPER
|
||||||
|
to make it compilable. Plus, tabify and change variable definition style.
|
||||||
|
|
||||||
Sun May 22 18:26:43 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sun May 22 18:26:43 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* gc.c (vm_xcalloc): use calloc provided by platforms.
|
* gc.c (vm_xcalloc): use calloc provided by platforms.
|
||||||
|
|
|
@ -572,13 +572,15 @@ ossl_asn1_get_asn1type(VALUE obj)
|
||||||
static int
|
static int
|
||||||
ossl_asn1_default_tag(VALUE obj)
|
ossl_asn1_default_tag(VALUE obj)
|
||||||
{
|
{
|
||||||
VALUE tmp_class = CLASS_OF(obj);
|
VALUE tmp_class, tag;
|
||||||
|
|
||||||
|
tmp_class = CLASS_OF(obj);
|
||||||
while (tmp_class) {
|
while (tmp_class) {
|
||||||
VALUE tag = rb_hash_lookup(class_tag_map, tmp_class);
|
tag = rb_hash_lookup(class_tag_map, tmp_class);
|
||||||
if (tag != Qnil) {
|
if (tag != Qnil) {
|
||||||
return NUM2INT(tag);
|
return NUM2INT(tag);
|
||||||
}
|
}
|
||||||
tmp_class = RCLASS_SUPER(tmp_class);
|
tmp_class = rb_class_superclass(tmp_class);
|
||||||
}
|
}
|
||||||
ossl_raise(eASN1Error, "universal tag for %s not found",
|
ossl_raise(eASN1Error, "universal tag for %s not found",
|
||||||
rb_class2name(CLASS_OF(obj)));
|
rb_class2name(CLASS_OF(obj)));
|
||||||
|
|
Loading…
Reference in a new issue