Ruby: ext/fiddle/closure.c File Reference

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

Data Structures | Macros | Functions | Variables
closure.c File Reference
`#include <fiddle.h>`
`#include <ruby/thread.h>`

Go to the source code of this file.

## Data Structures
struct | fiddle_closure
struct | callback_args

## Macros
#define | USE_FFI_CLOSURE_ALLOC 0

## Functions
int | ruby_thread_has_gvl_p (void)
void | Init_fiddle_closure (void)

## Variables
VALUE | cFiddleClosure
const rb_data_type_t | closure_data_type

## Macro Definition Documentation

## ◆ USE_FFI_CLOSURE_ALLOC

#define USE_FFI_CLOSURE_ALLOC 0

Definition at line 22 of file closure.c.

## Function Documentation

## ◆ Init_fiddle_closure()

void Init_fiddle_closure | ( | void |  | ) |

Definition at line 307 of file closure.c.

References cFiddleClosure, mFiddle, rb_cObject, rb_define_alloc_func(), rb_define_class_under(), rb_define_method, and rb_define_module().

Referenced by Init_fiddle().

## ◆ ruby_thread_has_gvl_p()

int ruby_thread_has_gvl_p | ( | void |  | ) |

Definition at line 1935 of file thread.c.

References rb_thread_struct::blocking_region_buffer.

Referenced by rb_fatal(), and ruby_waitpid_locked().

## Variable Documentation

## ◆ cFiddleClosure

VALUE cFiddleClosure

Definition at line 6 of file closure.c.

Referenced by Init_fiddle_closure().

## ◆ closure_data_type

const rb_data_type_t closure_data_type

Initial value:
= {
"fiddle/closure",
{0, dealloc, closure_memsize,},
}

Definition at line 56 of file closure.c.