summaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl.h
diff options
context:
space:
mode:
authormatz <matz@ruby-lang.org>2006-08-31 10:30:33 +0000
committermatz <matz@ruby-lang.org>2006-08-31 10:30:33 +0000
commit7e82075e4a9791b833bf83b8198a71cd54fcca09 (patch)
treed4c52a670064c6bff26552cee94e94f99e8fa9b4 /ext/openssl/ossl.h
parent35284a26599a05c329a1c3b8dbaf2bcb550e9423 (diff)
downloadruby-openssl-history-7e82075e4a9791b833bf83b8198a71cd54fcca09.tar.gz
* ruby.h (struct RString): embed small strings.
(RSTRING_LEN): defined for accessing string members. (RSTRING_PTR): ditto. * string.c: use RSTRING_LEN and RSTRING_PTR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl.h')
-rw-r--r--ext/openssl/ossl.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h
index 0366901..3be5630 100644
--- a/ext/openssl/ossl.h
+++ b/ext/openssl/ossl.h
@@ -118,11 +118,10 @@ VALUE ossl_x509crl_sk2ary(STACK_OF(X509_CRL) *crl);
VALUE ossl_buf2str(char *buf, int len);
#define ossl_str_adjust(str, p) \
do{\
- int len = RSTRING(str)->len;\
- int newlen = (p) - (unsigned char*)RSTRING(str)->ptr;\
+ int len = RSTRING_LEN(str);\
+ int newlen = (p) - (unsigned char*)RSTRING_PTR(str);\
assert(newlen <= len);\
- RSTRING(str)->len = newlen;\
- RSTRING(str)->ptr[newlen] = 0;\
+ rb_str_set_len(str, newlen);\
}while(0)
/*