ruby-changes:19646
From: nahi <ko1@a...>
Date: Sun, 22 May 2011 19:17:51 +0900 (JST)
Subject: [ruby-changes:19646] nahi:r31691 (trunk): * ext/openssl/ossl_asn1.c(ossl_asn1_default_tag): avoid using RCLASS_SUPER
nahi 2011-05-22 19:17:46 +0900 (Sun, 22 May 2011) New Revision: 31691 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=31691 Log: * ext/openssl/ossl_asn1.c(ossl_asn1_default_tag): avoid using RCLASS_SUPER to make it compilable. Plus, tabify and change variable definition style. Modified files: trunk/ChangeLog trunk/ext/openssl/ossl_asn1.c Index: ChangeLog =================================================================== --- ChangeLog (revision 31690) +++ ChangeLog (revision 31691) @@ -1,3 +1,8 @@ +Sun May 22 18:59:27 2011 Hiroshi Nakamura <nahi@r...> + + * 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@r...> * gc.c (vm_xcalloc): use calloc provided by platforms. Index: ext/openssl/ossl_asn1.c =================================================================== --- ext/openssl/ossl_asn1.c (revision 31690) +++ ext/openssl/ossl_asn1.c (revision 31691) @@ -572,13 +572,15 @@ 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))); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/