dl.c File Reference
`#include <ruby/ruby.h>`
`#include <ruby/io.h>`
`#include <ctype.h>`
`#include "dl.h"`

Go to the source code of this file.

## Functions

VALUE | rb_dl_dlopen (int argc, VALUE argv[], VALUE self)
VALUE | rb_dl_malloc (VALUE self, VALUE size)
VALUE | rb_dl_realloc (VALUE self, VALUE addr, VALUE size)
VALUE | rb_dl_free (VALUE self, VALUE addr)
VALUE | rb_dl_ptr2value (VALUE self, VALUE addr)
VALUE | rb_dl_value2ptr (VALUE self, VALUE val)
static void | rb_dl_init_callbacks (VALUE dl)
void | Init_dl (void)

## Variables

VALUE | rb_mDL
VALUE | rb_eDLError
VALUE | rb_eDLTypeError
ID | rbdl_id_cdecl
ID | rbdl_id_stdcall

## Function Documentation

void Init_dl | ( | void |  | ) |

Definition at line 101 of file dl.c.

References ALIGN_CHAR, ALIGN_DOUBLE, ALIGN_FLOAT, ALIGN_INT, ALIGN_LONG, ALIGN_SHORT, ALIGN_VOIDP, DLSTACK_SIZE, DLTYPE_CHAR, DLTYPE_DOUBLE, DLTYPE_FLOAT, DLTYPE_INT, DLTYPE_LONG, DLTYPE_SHORT, DLTYPE_VOID, DLTYPE_VOIDP, Init_dlcfunc(), Init_dlhandle(), Init_dlptr(), INT2NUM(), MAX_CALLBACK, PTR2NUM, rb_define_class_under(), rb_define_const(), rb_define_module(), rb_define_module_function(), rb_dl_dlopen(), rb_dl_free(), rb_dl_init_callbacks(), rb_dl_malloc(), rb_dl_ptr2value(), rb_dl_realloc(), rb_dl_value2ptr(), rb_eDLError, rb_eDLTypeError, rb_eStandardError, rb_intern_const, rb_mDL, rb_str_new2(), rbdl_id_cdecl, rbdl_id_stdcall, RUBY_PLATFORM, RUBY_VERSION, and ruby_xfree().

VALUE rb_dl_dlopen | ( | int | argc,
|  | VALUE | argv[],
|  | VALUE | self
| ) |  |

Definition at line 21 of file dl.c.

References rb_cDLHandle, and rb_class_new_instance().

Referenced by Init_dl().

VALUE rb_dl_free | ( | VALUE | self,
|  | VALUE | addr
| ) |  |

Definition at line 65 of file dl.c.

References NUM2PTR, ptr_data::ptr, Qnil, rb_secure(), and ruby_xfree().

Referenced by Init_dl().

static void rb_dl_init_callbacks | ( | VALUE | dl | ) |

static

Definition at line 88 of file dl.c.

References rb_autoload(), and rb_intern_const.

Referenced by Init_dl().

VALUE rb_dl_malloc | ( | VALUE | self,
|  | VALUE | size
| ) |  |

Definition at line 33 of file dl.c.

References NUM2INT, ptr_data::ptr, PTR2NUM, rb_secure(), and ruby_xmalloc().

Referenced by Init_dl().

VALUE rb_dl_ptr2value | ( | VALUE | self,
|  | VALUE | addr
| ) |  |

Definition at line 75 of file dl.c.

References NUM2PTR, and rb_secure().

Referenced by Init_dl().

VALUE rb_dl_realloc | ( | VALUE | self,
|  | VALUE | addr,
|  | VALUE | size
| ) |  |

Definition at line 50 of file dl.c.

References NUM2INT, NUM2PTR, ptr_data::ptr, PTR2NUM, rb_secure(), and ruby_xrealloc().

Referenced by Init_dl().

VALUE rb_dl_value2ptr | ( | VALUE | self,
|  | VALUE | val
| ) |  |

Definition at line 82 of file dl.c.

References PTR2NUM.

Referenced by Init_dl().

## Variable Documentation

VALUE rb_eDLError

Definition at line 14 of file dl.c.

Referenced by dlhandle_sym(), Init_dl(), rb_dlcfunc_call(), rb_dlhandle_close(), rb_dlhandle_initialize(), rb_dlhandle_sym(), rb_dlptr_aref(), rb_dlptr_aset(), and rb_dlptr_s_to_ptr().

VALUE rb_eDLTypeError

Definition at line 15 of file dl.c.

Referenced by Init_dl(), and rb_dlcfunc_call().

VALUE rb_mDL

Definition at line 13 of file dl.c.

Referenced by Init_dl(), Init_dlcfunc(), Init_dlhandle(), and Init_dlptr().

ID rbdl_id_cdecl

Definition at line 17 of file dl.c.

Referenced by Init_dl().

ID rbdl_id_stdcall

Definition at line 18 of file dl.c.

Referenced by Init_dl().