@@ -1483,7 +1483,7 @@ ossl_ssl_setup(VALUE self)
14831483 GetOpenFile (io , fptr );
14841484 rb_io_check_readable (fptr );
14851485 rb_io_check_writable (fptr );
1486- SSL_set_fd (ssl , TO_SOCKET (FPTR_TO_FD ( fptr ) ));
1486+ SSL_set_fd (ssl , TO_SOCKET (fptr -> fd ));
14871487
14881488 return Qtrue ;
14891489}
@@ -1548,12 +1548,12 @@ ossl_start_ssl(VALUE self, int (*func)(), const char *funcname, VALUE opts)
15481548 case SSL_ERROR_WANT_WRITE :
15491549 if (no_exception_p (opts )) { return sym_wait_writable ; }
15501550 write_would_block (nonblock );
1551- rb_io_wait_writable (FPTR_TO_FD ( fptr ) );
1551+ rb_io_wait_writable (fptr -> fd );
15521552 continue ;
15531553 case SSL_ERROR_WANT_READ :
15541554 if (no_exception_p (opts )) { return sym_wait_readable ; }
15551555 read_would_block (nonblock );
1556- rb_io_wait_readable (FPTR_TO_FD ( fptr ) );
1556+ rb_io_wait_readable (fptr -> fd );
15571557 continue ;
15581558 case SSL_ERROR_SYSCALL :
15591559 if (errno ) rb_sys_fail (funcname );
@@ -1691,7 +1691,7 @@ ossl_ssl_read_internal(int argc, VALUE *argv, VALUE self, int nonblock)
16911691 GetOpenFile (io , fptr );
16921692 if (ssl_started (ssl )) {
16931693 if (!nonblock && SSL_pending (ssl ) <= 0 )
1694- rb_thread_wait_fd (FPTR_TO_FD ( fptr ) );
1694+ rb_thread_wait_fd (fptr -> fd );
16951695 for (;;){
16961696 nread = SSL_read (ssl , RSTRING_PTR (str ), RSTRING_LENINT (str ));
16971697 switch (ssl_get_error (ssl , nread )){
@@ -1703,12 +1703,12 @@ ossl_ssl_read_internal(int argc, VALUE *argv, VALUE self, int nonblock)
17031703 case SSL_ERROR_WANT_WRITE :
17041704 if (no_exception_p (opts )) { return sym_wait_writable ; }
17051705 write_would_block (nonblock );
1706- rb_io_wait_writable (FPTR_TO_FD ( fptr ) );
1706+ rb_io_wait_writable (fptr -> fd );
17071707 continue ;
17081708 case SSL_ERROR_WANT_READ :
17091709 if (no_exception_p (opts )) { return sym_wait_readable ; }
17101710 read_would_block (nonblock );
1711- rb_io_wait_readable (FPTR_TO_FD ( fptr ) );
1711+ rb_io_wait_readable (fptr -> fd );
17121712 continue ;
17131713 case SSL_ERROR_SYSCALL :
17141714 if (!ERR_peek_error ()) {
@@ -1809,12 +1809,12 @@ ossl_ssl_write_internal(VALUE self, VALUE str, VALUE opts)
18091809 case SSL_ERROR_WANT_WRITE :
18101810 if (no_exception_p (opts )) { return sym_wait_writable ; }
18111811 write_would_block (nonblock );
1812- rb_io_wait_writable (FPTR_TO_FD ( fptr ) );
1812+ rb_io_wait_writable (fptr -> fd );
18131813 continue ;
18141814 case SSL_ERROR_WANT_READ :
18151815 if (no_exception_p (opts )) { return sym_wait_readable ; }
18161816 read_would_block (nonblock );
1817- rb_io_wait_readable (FPTR_TO_FD ( fptr ) );
1817+ rb_io_wait_readable (fptr -> fd );
18181818 continue ;
18191819 case SSL_ERROR_SYSCALL :
18201820 if (errno ) rb_sys_fail (0 );
0 commit comments