ext/dl/handle.c File Reference

#include <ruby.h>
#include "dl.h"

Go to the source code of this file.

Defines

#define dlclose(ptr)   w32_dlclose(ptr)
#define RTLD_NEXT   NULL
#define RTLD_DEFAULT   NULL
#define CHECK_DLERROR   if( err = dlerror() ){ func = 0; }

Functions

static void * w32_coredll (void)
static int w32_dlclose (void *ptr)
static void dlhandle_free (void *ptr)
static size_t dlhandle_memsize (const void *ptr)
VALUE rb_dlhandle_close (VALUE self)
VALUE rb_dlhandle_s_allocate (VALUE klass)
static VALUE predefined_dlhandle (void *handle)
VALUE rb_dlhandle_initialize (int argc, VALUE argv[], VALUE self)
VALUE rb_dlhandle_enable_close (VALUE self)
VALUE rb_dlhandle_disable_close (VALUE self)
static VALUE rb_dlhandle_close_enabled_p (VALUE self)
VALUE rb_dlhandle_to_i (VALUE self)
static VALUE dlhandle_sym (void *handle, const char *symbol)
VALUE rb_dlhandle_sym (VALUE self, VALUE sym)
VALUE rb_dlhandle_s_sym (VALUE self, VALUE sym)
void Init_dlhandle (void)

Variables

VALUE rb_cDLHandle
static const rb_data_type_t dlhandle_data_type

Define Documentation

#define CHECK_DLERROR   if( err = dlerror() ){ func = 0; }

Referenced by dlhandle_sym().

#define dlclose ( ptr   )     w32_dlclose(ptr)

Definition at line 31 of file handle.c.

Referenced by dlhandle_free(), dln_load(), rb_dlhandle_close(), and rb_dlhandle_initialize().

#define RTLD_DEFAULT   NULL

Definition at line 278 of file handle.c.

Referenced by Init_dlhandle().

#define RTLD_NEXT   NULL

Definition at line 275 of file handle.c.

Referenced by Init_dlhandle(), and rb_dlhandle_s_sym().


Function Documentation

static void dlhandle_free ( void *  ptr  )  [static]

Definition at line 35 of file handle.c.

References dlclose, dl_handle::enable_close, dl_handle::open, and dl_handle::ptr.

static size_t dlhandle_memsize ( const void *  ptr  )  [static]

Definition at line 44 of file handle.c.

static VALUE dlhandle_sym ( void *  handle,
const char *  symbol 
) [static]
void Init_dlhandle ( void   ) 
static VALUE predefined_dlhandle ( void *  handle  )  [static]

Definition at line 98 of file handle.c.

References DATA_PTR, OBJ_FREEZE, dl_handle::open, dl_handle::ptr, rb_cDLHandle, and rb_dlhandle_s_allocate().

Referenced by Init_dlhandle().

VALUE rb_dlhandle_close ( VALUE  self  ) 
static VALUE rb_dlhandle_close_enabled_p ( VALUE  self  )  [static]

Definition at line 227 of file handle.c.

References dlhandle_data_type, dl_handle::enable_close, Qfalse, Qtrue, and TypedData_Get_Struct.

Referenced by Init_dlhandle().

VALUE rb_dlhandle_disable_close ( VALUE  self  ) 

Definition at line 211 of file handle.c.

References dlhandle_data_type, dl_handle::enable_close, Qnil, and TypedData_Get_Struct.

Referenced by Init_dlhandle().

VALUE rb_dlhandle_enable_close ( VALUE  self  ) 

Definition at line 196 of file handle.c.

References dlhandle_data_type, dl_handle::enable_close, Qnil, and TypedData_Get_Struct.

Referenced by Init_dlhandle().

VALUE rb_dlhandle_initialize ( int  argc,
VALUE  argv[],
VALUE  self 
)
VALUE rb_dlhandle_s_allocate ( VALUE  klass  ) 
VALUE rb_dlhandle_s_sym ( VALUE  self,
VALUE  sym 
)

Definition at line 291 of file handle.c.

References dlhandle_sym(), RTLD_NEXT, and StringValueCStr.

Referenced by Init_dlhandle().

VALUE rb_dlhandle_sym ( VALUE  self,
VALUE  sym 
)
VALUE rb_dlhandle_to_i ( VALUE  self  ) 

Definition at line 243 of file handle.c.

References dlhandle_data_type, PTR2NUM, and TypedData_Get_Struct.

Referenced by Init_dlhandle().

static void* w32_coredll ( void   )  [static]

Definition at line 13 of file handle.c.

References NULL.

Referenced by rb_dlhandle_initialize(), and w32_dlclose().

static int w32_dlclose ( void *  ptr  )  [static]

Definition at line 23 of file handle.c.

References rb_w32_map_errno(), and w32_coredll().


Variable Documentation

Definition at line 8 of file handle.c.

Referenced by Init_dlhandle(), predefined_dlhandle(), rb_dl_dlopen(), and rb_dlhandle_s_allocate().


Generated on 1 Aug 2012 for Ruby by  doxygen 1.6.1