Ruby 4.1.0dev (2026-09-22 revision 1f717ae3d6ca76015582dc610e892be1aacb905b)
proc.h
1#ifndef INTERNAL_PROC_H /*-*-C-*-vi:se ft=c:*/
2#define INTERNAL_PROC_H
11#include "ruby/ruby.h" /* for rb_block_call_func_t */
12#include "ruby/st.h" /* for st_index_t */
13struct rb_block; /* in vm_core.h */
14struct rb_code_location_struct; /* in rubyparser.h */
15struct rb_iseq_struct; /* in vm_core.h */
16
17/* proc.c */
18VALUE rb_proc_location(VALUE self);
19st_index_t rb_hash_proc(st_index_t hash, VALUE proc);
20int rb_block_pair_yield_optimizable(void);
21int rb_block_arity(void);
22int rb_block_min_max_arity(int *max);
23VALUE rb_block_to_s(VALUE self, const struct rb_block *block, const char *additional_info);
24VALUE rb_callable_receiver(VALUE);
25VALUE rb_source_range_new(VALUE path, VALUE absolute_path,
26 const struct rb_code_location_struct *location);
27
28VALUE rb_func_proc_dup(VALUE src_obj);
29VALUE rb_func_lambda_new(rb_block_call_func_t func, VALUE val, int min_argc, int max_argc);
30VALUE rb_iseq_location(const struct rb_iseq_struct *iseq);
31VALUE rb_sym_to_proc(VALUE sym);
32
33#endif /* INTERNAL_PROC_H */
rb_block_call_func * rb_block_call_func_t
Shorthand type that represents an iterator-written-in-C function pointer.
Definition iterator.h:88
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40