diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-21 02:54:17 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-21 02:54:17 +0000 |
| commit | 895688e877d55271be718a48195edbf9300b9fbf (patch) | |
| tree | 83fa4ef9970b7cae82fd55da6c728d7a2d8c4c80 /ext | |
| parent | 46635e49e276ae6e54b204748a6b6e449c471e13 (diff) | |
| download | ruby-895688e877d55271be718a48195edbf9300b9fbf.tar.gz ruby-895688e877d55271be718a48195edbf9300b9fbf.tar.xz ruby-895688e877d55271be718a48195edbf9300b9fbf.zip | |
* ext/openssl/ossl_asn1.c (ossl_asn1_traverse): [ruby-dev:25261]
* ext/openssl/ossl_asn1.c (ossl_asn1_decode): ditto.
* ext/openssl/ossl_asn1.c (ossl_asn1_decode_all): ditto.
* struct.c (make_struct): [ruby-dev:25249]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/iconv/iconv.c | 2 | ||||
| -rw-r--r-- | ext/openssl/ossl_asn1.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 29ab2c7d7..c395373ff 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -732,7 +732,7 @@ iconv_iconv return iconv_convert(VALUE2ICONV(cd), str, NIL_P(n1) ? 0 : NUM2INT(n1), - NIL_P(n2) ? -1 : NUM2INT(n1), + NIL_P(n2) ? -1 : NUM2INT(n2), NULL); } diff --git a/ext/openssl/ossl_asn1.c b/ext/openssl/ossl_asn1.c index a961c16bc..abea6f5f0 100644 --- a/ext/openssl/ossl_asn1.c +++ b/ext/openssl/ossl_asn1.c @@ -816,6 +816,7 @@ ossl_asn1_traverse(VALUE self, VALUE obj) obj = ossl_to_der_if_possible(obj); StringValue(obj); + obj = rb_str_new4(obj); p = RSTRING(obj)->ptr; ossl_asn1_decode0(&p, RSTRING(obj)->len, &offset, 0, 0, 1); @@ -831,6 +832,7 @@ ossl_asn1_decode(VALUE self, VALUE obj) obj = ossl_to_der_if_possible(obj); StringValue(obj); + obj = rb_str_new4(obj); p = RSTRING(obj)->ptr; ary = ossl_asn1_decode0(&p, RSTRING(obj)->len, &offset, 0, 1, 0); ret = rb_ary_entry(ary, 0); @@ -847,6 +849,7 @@ ossl_asn1_decode_all(VALUE self, VALUE obj) obj = ossl_to_der_if_possible(obj); StringValue(obj); + obj = rb_str_new4(obj); p = RSTRING(obj)->ptr; ret = ossl_asn1_decode0(&p, RSTRING(obj)->len, &offset, 0, 0, 0); |
