Ruby: include/ruby/internal/intern/range.h Source File

Ruby 3.4.7p58 (2025-10-08 revision 7a5688e2a27668e48f8d6ff4af5b2208b98a2f5e)

range.h
Go to the documentation of this file.
1#ifndef RBIMPL_INTERN_RANGE_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_INTERN_RANGE_H
23#include "ruby/internal/attr/nonnull.h"
24#include "ruby/internal/dllexport.h"
25#include "ruby/internal/value.h"
26
27 RBIMPL_SYMBOL_EXPORT_BEGIN()
28
29/* range.c */
30
31
41 VALUE rb_range_new(VALUE beg, VALUE end, int excl);
42
43 RBIMPL_ATTR_NONNULL(())
69 VALUE rb_range_beg_len(VALUE range, long *begp, long *lenp, long len, int err);
70
71 RBIMPL_ATTR_NONNULL(())
85int rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp);
86
87 RBIMPL_SYMBOL_EXPORT_END()
88
89#endif /* RBIMPL_INTERN_RANGE_H */
dllexport.h
Tweaking visibility of C variables/functions.
RBIMPL_SYMBOL_EXPORT_END
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition dllexport.h:74
RBIMPL_SYMBOL_EXPORT_BEGIN
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition dllexport.h:65
rb_range_values
int rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp)
Deconstructs a range into its components.
Definition range.c:1804
rb_range_new
VALUE rb_range_new(VALUE beg, VALUE end, int excl)
Creates a new Range.
Definition range.c:68
rb_range_beg_len
VALUE rb_range_beg_len(VALUE range, long *begp, long *lenp, long len, int err)
Deconstructs a numerical range.
Definition range.c:1892
len
int len
Length of the buffer.
Definition io.h:8
nonnull.h
Defines RBIMPL_ATTR_NONNULL.
RBIMPL_ATTR_NONNULL
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull))
Definition nonnull.h:30
value.h
Defines VALUE and ID.
VALUE
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40