1#ifndef RBIMPL_INTERN_ERROR_H
2#define RBIMPL_INTERN_ERROR_H
35#define UNLIMITED_ARGUMENTS (-1)
37#define rb_exc_new2 rb_exc_new_cstr
38#define rb_exc_new3 rb_exc_new_str
41#define rb_check_arity rb_check_arity
211void rb_check_frozen(
VALUE obj);
238void rb_error_arity(
int argc,
int min,
int max);
240void rb_str_modify(
VALUE str);
249#define rb_check_frozen_internal rb_check_frozen
268#define rb_check_frozen rb_check_frozen_inline
287 rb_error_arity(argc, min, max);
Defines ASSUME / RB_LIKELY / UNREACHABLE.
Tweaking visibility of C variables/functions.
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Defines enum ruby_fl_type.
static bool RB_OBJ_FROZEN(VALUE obj)
Checks if an object is frozen.
@ RUBY_FL_USER3
User-defined flag.
@ RUBY_FL_USER2
User-defined flag.
#define T_STRING
Old name of RUBY_T_STRING.
#define FL_TEST_RAW
Old name of RB_FL_TEST_RAW.
void rb_name_error(ID name, const char *fmt,...)
Raises an instance of rb_eNameError.
void rb_check_copyable(VALUE obj, VALUE orig)
Ensures that the passed object can be initialize_copy relationship.
void rb_error_frozen(const char *what)
Identical to rb_frozen_error_raise(), except its raising exception has a message like "can't modify f...
void rb_name_error_str(VALUE name, const char *fmt,...)
Identical to rb_name_error(), except it takes a VALUE instead of ID.
void rb_frozen_error_raise(VALUE recv, const char *fmt,...)
Raises an instance of rb_eFrozenError.
void rb_invalid_str(const char *str, const char *type)
Honestly I don't understand the name, but it raises an instance of rb_eArgError.
VALUE rb_exc_new(VALUE etype, const char *ptr, long len)
Creates an instance of the passed exception class.
void rb_error_frozen_object(VALUE what)
Identical to rb_error_frozen(), except it takes arbitrary Ruby object instead of C's string.
VALUE rb_exc_new_str(VALUE etype, VALUE str)
Identical to rb_exc_new_cstr(), except it takes a Ruby's string instead of C's.
void rb_loaderror(const char *fmt,...)
Raises an instance of rb_eLoadError.
void rb_loaderror_with_path(VALUE path, const char *fmt,...)
Identical to rb_loaderror(), except it additionally takes which file is unable to load.
#define UNLIMITED_ARGUMENTS
This macro is used in conjunction with rb_check_arity().
static void rb_check_frozen_inline(VALUE obj)
Just another name of rb_check_frozen.
static int rb_check_arity(int argc, int min, int max)
Ensures that the passed integer is in the passed range.
#define rb_exc_new_cstr(exc, str)
Identical to rb_exc_new(), except it assumes the passed pointer is a pointer to a C string.
int len
Length of the buffer.
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull))
Defines RBIMPL_ATTR_NORETURN.
#define RBIMPL_ATTR_NORETURN()
Wraps (or simulates) [[noreturn]]
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
uintptr_t VALUE
Type that represents a Ruby object.
static bool RB_TYPE_P(VALUE obj, enum ruby_value_type t)
Queries if the given object is of given type.