ext/fiddle/handle.c File Reference

#include <ruby.h>
#include <fiddle.h>

Go to the source code of this file.

Data Structures

struct  dl_handle

Defines

#define SafeStringValueCStr(v)   (rb_check_safe_obj(rb_string_value(&v)), StringValueCStr(v))
#define CHECK_DLERROR

Functions

static void fiddle_handle_free (void *ptr)
static size_t fiddle_handle_memsize (const void *ptr)
static VALUE rb_fiddle_handle_close (VALUE self)
static VALUE rb_fiddle_handle_s_allocate (VALUE klass)
static VALUE predefined_fiddle_handle (void *handle)
static VALUE rb_fiddle_handle_initialize (int argc, VALUE argv[], VALUE self)
static VALUE rb_fiddle_handle_enable_close (VALUE self)
static VALUE rb_fiddle_handle_disable_close (VALUE self)
static VALUE rb_fiddle_handle_close_enabled_p (VALUE self)
static VALUE rb_fiddle_handle_to_i (VALUE self)
static VALUE fiddle_handle_sym (void *handle, VALUE symbol)
static VALUE rb_fiddle_handle_sym (VALUE self, VALUE sym)
static VALUE rb_fiddle_handle_s_sym (VALUE self, VALUE sym)
void Init_fiddle_handle (void)

Variables

VALUE rb_cHandle
static const rb_data_type_t fiddle_handle_data_type

Define Documentation

#define CHECK_DLERROR
#define SafeStringValueCStr (  )     (rb_check_safe_obj(rb_string_value(&v)), StringValueCStr(v))

Definition at line 4 of file handle.c.

Referenced by fiddle_handle_sym(), and rb_fiddle_handle_initialize().


Function Documentation

static void fiddle_handle_free ( void *  ptr  )  [static]

Definition at line 39 of file handle.c.

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

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

Definition at line 49 of file handle.c.

static VALUE fiddle_handle_sym ( void *  handle,
VALUE  symbol 
) [static]
void Init_fiddle_handle ( void   ) 
static VALUE predefined_fiddle_handle ( void *  handle  )  [static]
static VALUE rb_fiddle_handle_close ( VALUE  self  )  [static]
static VALUE rb_fiddle_handle_close_enabled_p ( VALUE  self  )  [static]

Definition at line 236 of file handle.c.

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

Referenced by Init_fiddle_handle().

static VALUE rb_fiddle_handle_disable_close ( VALUE  self  )  [static]

Definition at line 219 of file handle.c.

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

Referenced by Init_fiddle_handle().

static VALUE rb_fiddle_handle_enable_close ( VALUE  self  )  [static]

Definition at line 204 of file handle.c.

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

Referenced by Init_fiddle_handle().

static VALUE rb_fiddle_handle_initialize ( int  argc,
VALUE  argv[],
VALUE  self 
) [static]
static VALUE rb_fiddle_handle_s_allocate ( VALUE  klass  )  [static]
static VALUE rb_fiddle_handle_s_sym ( VALUE  self,
VALUE  sym 
) [static]

Definition at line 300 of file handle.c.

References fiddle_handle_sym(), and RTLD_NEXT.

Referenced by Init_fiddle_handle().

static VALUE rb_fiddle_handle_sym ( VALUE  self,
VALUE  sym 
) [static]
static VALUE rb_fiddle_handle_to_i ( VALUE  self  )  [static]

Definition at line 252 of file handle.c.

References fiddle_handle_data_type, PTR2NUM, and TypedData_Get_Struct.

Referenced by Init_fiddle_handle().


Variable Documentation

const rb_data_type_t fiddle_handle_data_type [static]
VALUE rb_cHandle

Generated on 18 May 2020 for Ruby by  doxygen 1.6.1