Ruby: ext/fiddle/fiddle.c File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Functions | Variables
fiddle.c File Reference
`#include <fiddle.h>`

Go to the source code of this file.

## Functions
void | Init_fiddle_pointer (void)
void | Init_fiddle_pinned (void)
VALUE | rb_fiddle_free (VALUE self, VALUE addr)
VALUE | rb_fiddle_ptr2value (VALUE self, VALUE addr)
void | Init_fiddle_handle (void)
void | Init_fiddle (void)

## Variables
VALUE | mFiddle
VALUE | rb_eFiddleDLError
VALUE | rb_eFiddleError

## Function Documentation

## ◆ Init_fiddle()

void Init_fiddle | ( | void |  | ) |

Definition at line 102 of file fiddle.c.

References ALIGN_CHAR, ALIGN_DOUBLE, ALIGN_FLOAT, ALIGN_INT, ALIGN_INT16_T, ALIGN_INT32_T, ALIGN_INT64_T, ALIGN_INT8_T, ALIGN_LONG, ALIGN_OF, ALIGN_SHORT, ALIGN_VOIDP, Init_fiddle_closure(), Init_fiddle_function(), Init_fiddle_handle(), Init_fiddle_pinned(), Init_fiddle_pointer(), INT2NUM, mFiddle, PTR2NUM, Qfalse, Qtrue, rb_const_defined(), rb_const_remove(), rb_define_class_under(), rb_define_const(), rb_define_module(), rb_define_module_function, rb_eFiddleDLError, rb_eFiddleError, rb_eStandardError, rb_fiddle_free(), rb_fiddle_ptr2value(), rb_intern(), rb_str_new2, RUBY_PLATFORM, ruby_xfree(), TYPE_CHAR, TYPE_CONST_STRING, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT, TYPE_INT8_T, TYPE_INTPTR_T, TYPE_LONG, TYPE_PTRDIFF_T, TYPE_SHORT, TYPE_SIZE_T, TYPE_SSIZE_T, TYPE_UINTPTR_T, TYPE_VARIADIC, TYPE_VOID, and TYPE_VOIDP.

## ◆ Init_fiddle_handle()

void Init_fiddle_handle | ( | void |  | ) |

Definition at line 376 of file handle.c.

References INT2NUM, mFiddle, rb_cHandle, rb_cObject, rb_define_alloc_func(), rb_define_class_under(), rb_define_const(), rb_define_method, rb_define_singleton_method, RTLD_DEFAULT, and RTLD_NEXT.

Referenced by Init_fiddle().

## ◆ Init_fiddle_pinned()

void Init_fiddle_pinned | ( | void |  | ) |

Definition at line 108 of file pinned.c.

References mFiddle, rb_cObject, rb_cPinned, rb_define_alloc_func(), rb_define_class_under(), rb_define_method, rb_eFiddleClearedReferenceError, and rb_eFiddleError.

Referenced by Init_fiddle().

## ◆ Init_fiddle_pointer()

void Init_fiddle_pointer | ( | void |  | ) |

Definition at line 794 of file pointer.c.

References mFiddle, rb_cObject, rb_cPointer, rb_define_alloc_func(), rb_define_class_under(), rb_define_const(), rb_define_method, rb_define_singleton_method, rb_intern(), and rb_memory_view_register().

Referenced by Init_fiddle().

## ◆ rb_fiddle_free()

VALUE rb_fiddle_free | ( | VALUE | self,
|  | VALUE | addr
| ) |  |

Definition at line 50 of file fiddle.c.

References NUM2PTR, ptr, Qnil, and ruby_xfree().

Referenced by Init_fiddle().

## ◆ rb_fiddle_ptr2value()

VALUE rb_fiddle_ptr2value | ( | VALUE | self,
|  | VALUE | addr
| ) |  |

Definition at line 75 of file fiddle.c.

References NUM2PTR.

Referenced by Init_fiddle().

## Variable Documentation

## ◆ mFiddle

VALUE mFiddle

Definition at line 3 of file fiddle.c.

Referenced by Init_fiddle(), Init_fiddle_closure(), Init_fiddle_function(), Init_fiddle_handle(), Init_fiddle_pinned(), Init_fiddle_pointer(), and rb_fiddle_generic_to_value().

## ◆ rb_eFiddleDLError

VALUE rb_eFiddleDLError

Definition at line 4 of file fiddle.c.

Referenced by Init_fiddle().

## ◆ rb_eFiddleError

VALUE rb_eFiddleError

Definition at line 5 of file fiddle.c.

Referenced by Init_fiddle(), and Init_fiddle_pinned().