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

ruby-changes:13681

From: nobu <ko1@a...>
Date: Sun, 25 Oct 2009 15:44:48 +0900 (JST)
Subject: [ruby-changes:13681] Ruby:r25467 (trunk): * ext/dl/handle.c (dlhandle_sym): fixed an invalid local variable

nobu	2009-10-25 15:44:26 +0900 (Sun, 25 Oct 2009)

  New Revision: 25467

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

  Log:
    * ext/dl/handle.c (dlhandle_sym): fixed an invalid local variable
      declaration.

  Modified files:
    trunk/ChangeLog
    trunk/ext/dl/handle.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 25466)
+++ ChangeLog	(revision 25467)
@@ -1,3 +1,8 @@
+Sun Oct 25 15:44:24 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* ext/dl/handle.c (dlhandle_sym): fixed an invalid local variable
+	  declaration.
+
 Sun Oct 25 13:33:58 2009  Nobuyoshi Nakada  <nobu@r...>
 
 	* io.c (io_cntl): F_DUPFD is platform dependent.
Index: ext/dl/handle.c
===================================================================
--- ext/dl/handle.c	(revision 25466)
+++ ext/dl/handle.c	(revision 25467)
@@ -296,16 +296,16 @@
 static VALUE
 dlhandle_sym(void *handle, const char *name)
 {
-    rb_secure(2);
-
 #if defined(HAVE_DLERROR)
     const char *err;
 # define CHECK_DLERROR if( err = dlerror() ){ func = 0; }
 #else
 # define CHECK_DLERROR
 #endif
-    void (*func)() = dlsym(handle, name);
+    void (*func)();
 
+    rb_secure(2);
+    func = dlsym(handle, name);
     CHECK_DLERROR;
 #if defined(FUNC_STDCALL)
     if( !func ){
@@ -374,4 +374,4 @@
     rb_define_method(rb_cDLHandle, "close_enabled?", rb_dlhandle_close_enabled_p, 0);
 }
 
-/* mode: c; tab-with=8; sw=8; ts=8; noexpandtab: */
+/* mode: c; tab-with=8; sw=4; ts=8; noexpandtab: */

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

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