[前][次][番号順一覧][スレッド一覧]

ruby-changes:29830

From: nobu <ko1@a...>
Date: Wed, 10 Jul 2013 11:20:14 +0900 (JST)
Subject: [ruby-changes:29830] nobu:r41882 (trunk): ossl.c: fix argument type

nobu	2013-07-10 11:19:54 +0900 (Wed, 10 Jul 2013)

  New Revision: 41882

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41882

  Log:
    ossl.c: fix argument type
    
    * ext/openssl/ossl.c (ossl_lock_callback): fix argument type, and
      remove redundant casts.

  Modified files:
    trunk/ext/openssl/ossl.c

Index: ext/openssl/ossl.c
===================================================================
--- ext/openssl/ossl.c	(revision 41881)
+++ ext/openssl/ossl.c	(revision 41882)
@@ -463,7 +463,7 @@ ossl_fips_mode_set(VALUE self, VALUE ena https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl.c#L463
  */
 static VALUE* ossl_locks;
 
-static void ossl_lock_callback(int mode, int type, char *file, int line)
+static void ossl_lock_callback(int mode, int type, const char *file, int line)
 {
     if (mode & CRYPTO_LOCK) {
 	rb_mutex_lock(ossl_locks[type]);
@@ -494,8 +494,8 @@ static void Init_ossl_locks(void) https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl.c#L494
 	rb_gc_register_mark_object(ossl_locks[i]);
     }
 
-    CRYPTO_set_id_callback((unsigned long (*)())ossl_thread_id);
-    CRYPTO_set_locking_callback((void (*)())ossl_lock_callback);
+    CRYPTO_set_id_callback(ossl_thread_id);
+    CRYPTO_set_locking_callback(ossl_lock_callback);
 }
 
 /*

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]