ruby-changes:19126
From: naruse <ko1@a...>
Date: Thu, 24 Mar 2011 13:50:22 +0900 (JST)
Subject: [ruby-changes:19126] Ruby:r31165 (trunk): * ext/openssl/ossl_rand.c (ossl_rand_egd_bytes): use NUM2INT because
naruse 2011-03-24 13:49:18 +0900 (Thu, 24 Mar 2011) New Revision: 31165 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=31165 Log: * ext/openssl/ossl_rand.c (ossl_rand_egd_bytes): use NUM2INT because the result is used with functions whose argument is int. * ext/openssl/ossl_ssl.c (ossl_sslctx_setup): ditto. * ext/openssl/ossl_x509store.c (ossl_x509store_set_purpose): ditto. * ext/openssl/ossl_x509store.c (ossl_x509store_set_trust): ditto. * ext/openssl/ossl_x509store.c (ossl_x509stctx_set_purpose): ditto. * ext/openssl/ossl_x509store.c (ossl_x509stctx_set_trust): ditto. Modified files: trunk/ChangeLog trunk/ext/openssl/ossl_rand.c trunk/ext/openssl/ossl_ssl.c trunk/ext/openssl/ossl_x509store.c Index: ChangeLog =================================================================== --- ChangeLog (revision 31164) +++ ChangeLog (revision 31165) @@ -1,3 +1,18 @@ +Thu Mar 24 11:48:19 2011 NARUSE, Yui <naruse@r...> + + * ext/openssl/ossl_rand.c (ossl_rand_egd_bytes): use NUM2INT because + the result is used with functions whose argument is int. + + * ext/openssl/ossl_ssl.c (ossl_sslctx_setup): ditto. + + * ext/openssl/ossl_x509store.c (ossl_x509store_set_purpose): ditto. + + * ext/openssl/ossl_x509store.c (ossl_x509store_set_trust): ditto. + + * ext/openssl/ossl_x509store.c (ossl_x509stctx_set_purpose): ditto. + + * ext/openssl/ossl_x509store.c (ossl_x509stctx_set_trust): ditto. + Thu Mar 24 11:36:55 2011 NARUSE, Yui <naruse@r...> * ext/openssl/ossl_x509name.c: id_aref's type is ID. Index: ext/openssl/ossl_ssl.c =================================================================== --- ext/openssl/ossl_ssl.c (revision 31164) +++ ext/openssl/ossl_ssl.c (revision 31165) @@ -630,7 +630,7 @@ if(!NIL_P(val)) SSL_CTX_set_timeout(ctx, NUM2LONG(val)); val = ossl_sslctx_get_verify_dep(self); - if(!NIL_P(val)) SSL_CTX_set_verify_depth(ctx, NUM2LONG(val)); + if(!NIL_P(val)) SSL_CTX_set_verify_depth(ctx, NUM2INT(val)); val = ossl_sslctx_get_options(self); if(!NIL_P(val)) SSL_CTX_set_options(ctx, NUM2LONG(val)); Index: ext/openssl/ossl_x509store.c =================================================================== --- ext/openssl/ossl_x509store.c (revision 31164) +++ ext/openssl/ossl_x509store.c (revision 31165) @@ -170,7 +170,7 @@ { #if (OPENSSL_VERSION_NUMBER >= 0x00907000L) X509_STORE *store; - long p = NUM2LONG(purpose); + int p = NUM2INT(purpose); GetX509Store(self, store); X509_STORE_set_purpose(store, p); @@ -186,7 +186,7 @@ { #if (OPENSSL_VERSION_NUMBER >= 0x00907000L) X509_STORE *store; - long t = NUM2LONG(trust); + int t = NUM2INT(trust); GetX509Store(self, store); X509_STORE_set_trust(store, t); @@ -526,7 +526,7 @@ ossl_x509stctx_set_purpose(VALUE self, VALUE purpose) { X509_STORE_CTX *store; - long p = NUM2LONG(purpose); + int p = NUM2INT(purpose); GetX509StCtx(self, store); X509_STORE_CTX_set_purpose(store, p); @@ -538,7 +538,7 @@ ossl_x509stctx_set_trust(VALUE self, VALUE trust) { X509_STORE_CTX *store; - long t = NUM2LONG(trust); + int t = NUM2INT(trust); GetX509StCtx(self, store); X509_STORE_CTX_set_trust(store, t); Index: ext/openssl/ossl_rand.c =================================================================== --- ext/openssl/ossl_rand.c (revision 31164) +++ ext/openssl/ossl_rand.c (revision 31165) @@ -149,7 +149,7 @@ static VALUE ossl_rand_egd_bytes(VALUE self, VALUE filename, VALUE len) { - long n = NUM2INT(len); + int n = NUM2INT(len); SafeStringValue(filename); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/