File tree Expand file tree Collapse file tree 2 files changed +5
-22
lines changed Expand file tree Collapse file tree 2 files changed +5
-22
lines changed Original file line number Diff line number Diff line change @@ -53,32 +53,17 @@ ossl_protect_obj2bio(VALUE obj, int *status)
5353}
5454
5555VALUE
56- ossl_membio2str0 (BIO * bio )
56+ ossl_membio2str (BIO * bio )
5757{
5858 VALUE ret ;
59+ int state ;
5960 BUF_MEM * buf ;
6061
6162 BIO_get_mem_ptr (bio , & buf );
62- ret = rb_str_new (buf -> data , buf -> length );
63-
64- return ret ;
65- }
66-
67- VALUE
68- ossl_protect_membio2str (BIO * bio , int * status )
69- {
70- return rb_protect ((VALUE (* )(VALUE ))ossl_membio2str0 , (VALUE )bio , status );
71- }
72-
73- VALUE
74- ossl_membio2str (BIO * bio )
75- {
76- VALUE ret ;
77- int status = 0 ;
78-
79- ret = ossl_protect_membio2str (bio , & status );
63+ ret = ossl_str_new (buf -> data , buf -> length , & state );
8064 BIO_free (bio );
81- if (status ) rb_jump_tag (status );
65+ if (state )
66+ rb_jump_tag (state );
8267
8368 return ret ;
8469}
Original file line number Diff line number Diff line change 1212
1313BIO * ossl_obj2bio (VALUE );
1414BIO * ossl_protect_obj2bio (VALUE ,int * );
15- VALUE ossl_membio2str0 (BIO * );
1615VALUE ossl_membio2str (BIO * );
17- VALUE ossl_protect_membio2str (BIO * ,int * );
1816
1917#endif
You can’t perform that action at this time.
0 commit comments