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

Ruby 3.2.5p208 (2024-07-26 revision 31d0f1a2e7dbfb60731d1f05b868e1d578cda493)

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:106
RBIMPL_SYMBOL_EXPORT_BEGIN
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition dllexport.h:97
rb_range_values
int rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp)
Deconstructs a range into its components.
Definition range.c:1490
rb_range_new
VALUE rb_range_new(VALUE beg, VALUE end, int excl)
Creates a new Range.
Definition range.c:67
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:1578
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