mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ruby.h (struct RArray): embed small arrays.
(RARRAY_LEN): defined for accessing array members. (RARRAY_PTR): ditto. * array.c: use RARRAY_LEN and RARRAY_PTR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8581164ea6
commit
2156870525
39 changed files with 804 additions and 684 deletions
|
|
@ -403,14 +403,14 @@ ossl_x509req_set_attributes(VALUE self, VALUE ary)
|
|||
VALUE item;
|
||||
|
||||
Check_Type(ary, T_ARRAY);
|
||||
for (i=0;i<RARRAY(ary)->len; i++) {
|
||||
OSSL_Check_Kind(RARRAY(ary)->ptr[i], cX509Attr);
|
||||
for (i=0;i<RARRAY_LEN(ary); i++) {
|
||||
OSSL_Check_Kind(RARRAY_PTR(ary)[i], cX509Attr);
|
||||
}
|
||||
GetX509Req(self, req);
|
||||
sk_X509_ATTRIBUTE_pop_free(req->req_info->attributes, X509_ATTRIBUTE_free);
|
||||
req->req_info->attributes = NULL;
|
||||
for (i=0;i<RARRAY(ary)->len; i++) {
|
||||
item = RARRAY(ary)->ptr[i];
|
||||
for (i=0;i<RARRAY_LEN(ary); i++) {
|
||||
item = RARRAY_PTR(ary)[i];
|
||||
attr = DupX509AttrPtr(item);
|
||||
if (!X509_REQ_add1_attr(req, attr)) {
|
||||
ossl_raise(eX509ReqError, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue