* ext/dl/handle.c (dlhandle_sym): fixed an invalid local variable
declaration. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d64d462f7a
commit
475e705b2f
@ -1,3 +1,8 @@
|
|||||||
|
Sun Oct 25 15:44:24 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* ext/dl/handle.c (dlhandle_sym): fixed an invalid local variable
|
||||||
|
declaration.
|
||||||
|
|
||||||
Sun Oct 25 13:33:58 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sun Oct 25 13:33:58 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* io.c (io_cntl): F_DUPFD is platform dependent.
|
* io.c (io_cntl): F_DUPFD is platform dependent.
|
||||||
|
@ -296,16 +296,16 @@ rb_dlhandle_s_sym(VALUE self, VALUE sym)
|
|||||||
static VALUE
|
static VALUE
|
||||||
dlhandle_sym(void *handle, const char *name)
|
dlhandle_sym(void *handle, const char *name)
|
||||||
{
|
{
|
||||||
rb_secure(2);
|
|
||||||
|
|
||||||
#if defined(HAVE_DLERROR)
|
#if defined(HAVE_DLERROR)
|
||||||
const char *err;
|
const char *err;
|
||||||
# define CHECK_DLERROR if( err = dlerror() ){ func = 0; }
|
# define CHECK_DLERROR if( err = dlerror() ){ func = 0; }
|
||||||
#else
|
#else
|
||||||
# define CHECK_DLERROR
|
# define CHECK_DLERROR
|
||||||
#endif
|
#endif
|
||||||
void (*func)() = dlsym(handle, name);
|
void (*func)();
|
||||||
|
|
||||||
|
rb_secure(2);
|
||||||
|
func = dlsym(handle, name);
|
||||||
CHECK_DLERROR;
|
CHECK_DLERROR;
|
||||||
#if defined(FUNC_STDCALL)
|
#if defined(FUNC_STDCALL)
|
||||||
if( !func ){
|
if( !func ){
|
||||||
@ -374,4 +374,4 @@ Init_dlhandle(void)
|
|||||||
rb_define_method(rb_cDLHandle, "close_enabled?", rb_dlhandle_close_enabled_p, 0);
|
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: */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user