diff options
author | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-22 10:17:46 +0000 |
---|---|---|
committer | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-22 10:17:46 +0000 |
commit | 75431b924cffd2731372c7ef06349b492faa601c (patch) | |
tree | 02b1046941bed939815700041b0d681a27e544ec /ext/openssl | |
parent | 70b4b6dc8b54f7e4e5c48460ecd2843573c5a9a4 (diff) | |
download | ruby-75431b924cffd2731372c7ef06349b492faa601c.tar.gz |
* 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
Diffstat (limited to 'ext/openssl')
-rw-r--r-- | ext/openssl/ossl_asn1.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/ext/openssl/ossl_asn1.c b/ext/openssl/ossl_asn1.c index 5ad1ffb0e0..63e4dd8399 100644 --- a/ext/openssl/ossl_asn1.c +++ b/ext/openssl/ossl_asn1.c @@ -572,13 +572,15 @@ ossl_asn1_get_asn1type(VALUE obj) static int ossl_asn1_default_tag(VALUE obj) { - VALUE tmp_class = CLASS_OF(obj); + VALUE tmp_class, tag; + + tmp_class = CLASS_OF(obj); while (tmp_class) { - VALUE tag = rb_hash_lookup(class_tag_map, tmp_class); - if (tag != Qnil) { - return NUM2INT(tag); - } - tmp_class = RCLASS_SUPER(tmp_class); + tag = rb_hash_lookup(class_tag_map, tmp_class); + if (tag != Qnil) { + return NUM2INT(tag); + } + tmp_class = rb_class_superclass(tmp_class); } ossl_raise(eASN1Error, "universal tag for %s not found", rb_class2name(CLASS_OF(obj))); |