diff options
author | Zachary Scott <e@zzak.io> | 2015-01-05 11:59:50 -0800 |
---|---|---|
committer | Zachary Scott <e@zzak.io> | 2015-01-05 11:59:50 -0800 |
commit | 2953dfd4ad925a669110fed1993d6e83b24e420f (patch) | |
tree | 05e4d2a6750e0ce6dd408c2b8f2f5bf597cfe54a /ext/openssl/ossl_ssl.h | |
parent | 77269de78e376981342127d30dc0b953b9bcd781 (diff) | |
download | ruby-openssl-2953dfd4ad925a669110fed1993d6e83b24e420f.tar.gz |
Sync with ruby trunk
Diffstat (limited to 'ext/openssl/ossl_ssl.h')
-rw-r--r-- | ext/openssl/ossl_ssl.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/openssl/ossl_ssl.h b/ext/openssl/ossl_ssl.h index 034762fc..0c20b107 100644 --- a/ext/openssl/ossl_ssl.h +++ b/ext/openssl/ossl_ssl.h @@ -11,8 +11,12 @@ #if !defined(_OSSL_SSL_H_) #define _OSSL_SSL_H_ +#define GetSSL(obj, ssl) do { \ + TypedData_Get_Struct((obj), SSL, &ossl_ssl_type, (ssl)); \ +} while (0) + #define GetSSLSession(obj, sess) do { \ - Data_Get_Struct((obj), SSL_SESSION, (sess)); \ + TypedData_Get_Struct((obj), SSL_SESSION, &ossl_ssl_session_type, (sess)); \ if (!(sess)) { \ ossl_raise(rb_eRuntimeError, "SSL Session wasn't initialized."); \ } \ @@ -23,6 +27,8 @@ GetSSLSession((obj), (sess)); \ } while (0) +extern const rb_data_type_t ossl_ssl_type; +extern const rb_data_type_t ossl_ssl_session_type; extern VALUE mSSL; extern VALUE eSSLError; extern VALUE cSSLSocket; |