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

ruby-changes:22539

From: nobu <ko1@a...>
Date: Tue, 14 Feb 2012 12:10:26 +0900 (JST)
Subject: [ruby-changes:22539] nobu:r34588 (trunk): * variable.c (autoload_const_set, autoload_require): fix

nobu	2012-02-14 12:10:11 +0900 (Tue, 14 Feb 2012)

  New Revision: 34588

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

  Log:
    * variable.c (autoload_const_set, autoload_require): fix
      signatures.

  Modified files:
    trunk/ChangeLog
    trunk/variable.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 34587)
+++ ChangeLog	(revision 34588)
@@ -1,3 +1,8 @@
+Tue Feb 14 12:10:04 2012  Nobuyoshi Nakada  <nobu@r...>
+
+	* variable.c (autoload_const_set, autoload_require): fix
+	  signatures.
+
 Tue Feb 14 05:23:40 2012  Eric Hodel  <drbrain@s...>
 
 	* process.c (proc_wait):  Change typo "SystemError" to
Index: variable.c
===================================================================
--- variable.c	(revision 34587)
+++ variable.c	(revision 34588)
@@ -1639,16 +1639,19 @@
     VALUE value;
 };
 
-static void
-autoload_const_set(struct autoload_const_set_args* args)
+static VALUE
+autoload_const_set(VALUE arg)
 {
+    struct autoload_const_set_args* args = (struct autoload_const_set_args *)arg;
     autoload_delete(args->mod, args->id);
     rb_const_set(args->mod, args->id, args->value);
+    return 0;			/* ignored */
 }
 
 static VALUE
-autoload_require(struct autoload_data_i *ele)
+autoload_require(VALUE arg)
 {
+    struct autoload_data_i *ele = (struct autoload_data_i *)arg;
     return rb_require_safe(ele->feature, ele->safe_level);
 }
 
@@ -1674,7 +1677,7 @@
 	ele->thread = rb_thread_current();
     }
     /* autoload_data_i can be deleted by another thread while require */
-    result = rb_protect((VALUE(*)(VALUE))autoload_require, (VALUE)ele, &state);
+    result = rb_protect(autoload_require, (VALUE)ele, &state);
     if (ele->thread == rb_thread_current()) {
 	ele->thread = Qnil;
     }
@@ -1690,7 +1693,7 @@
 	    args.value = ele->value;
 	    safe_backup = rb_safe_level();
 	    rb_set_safe_level_force(ele->safe_level);
-	    rb_ensure((VALUE(*)(VALUE))autoload_const_set, (VALUE)&args, reset_safe, (VALUE)safe_backup);
+	    rb_ensure(autoload_const_set, (VALUE)&args, reset_safe, (VALUE)safe_backup);
 	}
     }
     RB_GC_GUARD(load);

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

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