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

ruby-changes:20538

From: naruse <ko1@a...>
Date: Wed, 20 Jul 2011 15:51:04 +0900 (JST)
Subject: [ruby-changes:20538] naruse:r32586 (trunk): * ext/dl/handle.c (dlhandle_sym): clear previous error with dlerror()

naruse	2011-07-20 15:50:54 +0900 (Wed, 20 Jul 2011)

  New Revision: 32586

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

  Log:
    * ext/dl/handle.c (dlhandle_sym): clear previous error with dlerror()
      before calling dlsym(). [ruby-dev:44091] [Bug #5021]

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

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 32585)
+++ ChangeLog	(revision 32586)
@@ -1,3 +1,8 @@
+Wed Jul 20 15:16:22 2011  NARUSE, Yui  <naruse@r...>
+
+	* ext/dl/handle.c (dlhandle_sym): clear previous error with dlerror()
+	  before calling dlsym(). [ruby-dev:44091] [Bug #5021]
+
 Wed Jul 20 07:16:26 2011  Kazuhiro NISHIYAMA  <zn@m...>
 
 	* NEWS: mention Kernel#warn.  [ruby-core:38119] [Feature #5029]
Index: ext/dl/handle.c
===================================================================
--- ext/dl/handle.c	(revision 32585)
+++ ext/dl/handle.c	(revision 32586)
@@ -305,6 +305,9 @@
     void (*func)();
 
     rb_secure(2);
+#ifdef HAVE_DLERROR
+    dlerror();
+#endif
     func = (void (*)())(VALUE)dlsym(handle, name);
     CHECK_DLERROR;
 #if defined(FUNC_STDCALL)

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

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