[macruby-changes] [5088] MacRuby/trunk/ext/openssl/ossl_pkey_rsa.c

source_changes at macosforge.org source_changes at macosforge.org
Mon Dec 27 18:54:42 PST 2010


Revision: 5088
          http://trac.macosforge.org/projects/ruby/changeset/5088
Author:   watson1978 at gmail.com
Date:     2010-12-27 18:54:38 -0800 (Mon, 27 Dec 2010)
Log Message:
-----------
Fixed the typo. had better use a rb_bstr_resize.

Modified Paths:
--------------
    MacRuby/trunk/ext/openssl/ossl_pkey_rsa.c

Modified: MacRuby/trunk/ext/openssl/ossl_pkey_rsa.c
===================================================================
--- MacRuby/trunk/ext/openssl/ossl_pkey_rsa.c	2010-12-28 02:35:55 UTC (rev 5087)
+++ MacRuby/trunk/ext/openssl/ossl_pkey_rsa.c	2010-12-28 02:54:38 UTC (rev 5088)
@@ -348,7 +348,7 @@
 				 (unsigned char *)rb_bstr_bytes(str), pkey->pkey.rsa,
 				 pad);
     if (buf_len < 0) ossl_raise(eRSAError, NULL);
-    rb_str_set_len(str, buf_len);
+    rb_bstr_resize(str, buf_len);
     
     return str;
 }
@@ -378,7 +378,7 @@
 				  (unsigned char *)rb_bstr_bytes(str), pkey->pkey.rsa,
 				  pad);
     if (buf_len < 0) ossl_raise(eRSAError, NULL);
-    rb_str_set_len(str, buf_len);
+    rb_bstr_resize(str, buf_len);
     
     return str;
 }
@@ -409,7 +409,7 @@
 				  (unsigned char *)rb_bstr_bytes(str), pkey->pkey.rsa,
 				  pad);
     if (buf_len < 0) ossl_raise(eRSAError, NULL);
-    rb_str_set_len(str, buf_len);
+    rb_bstr_resize(str, buf_len);
 
     return str;
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101227/fe2505bb/attachment.html>


More information about the macruby-changes mailing list