1 #ifndef RBIMPL_ARITHMETIC_CHAR_H
2 #define RBIMPL_ARITHMETIC_CHAR_H
28 #include "ruby/internal/cast.h"
32 #define RB_NUM2CHR rb_num2char_inline
33 #define NUM2CHR RB_NUM2CHR
34 #define CHR2FIX RB_CHR2FIX
37 #define RB_CHR2FIX RB_CHR2FIX
Defines RBIMPL_ATTR_ARTIFICIAL.
#define RBIMPL_ATTR_ARTIFICIAL()
Wraps (or simulates) __attribute__((artificial))
static VALUE RB_CHR2FIX(unsigned char c)
Converts a C's unsigned char into an instance of rb_cInteger.
static char rb_num2char_inline(VALUE x)
Converts an instance of rb_cNumeric into C's char.
Defines RBIMPL_ATTR_CONST.
#define RBIMPL_ATTR_CONST_UNLESS_DEBUG()
Enables RBIMPL_ATTR_CONST if and only if.
#define RBIMPL_ATTR_CONSTEXPR_UNLESS_DEBUG(_)
Enables RBIMPL_ATTR_CONSTEXPR if and only if.
Arithmetic conversion between C's int and Ruby's.
#define RB_NUM2INT
Just another name of rb_num2int_inline.
Arithmetic conversion between C's long and Ruby's.
static VALUE RB_INT2FIX(long i)
Converts a C's long into an instance of rb_cInteger.
#define inline
Old Visual Studio versions do not support the inline keyword, so we need to define it to be __inline.
static char * RSTRING_PTR(VALUE str)
Queries the contents pointer of the string.
static long RSTRING_LEN(VALUE str)
Queries the length of the string.
uintptr_t VALUE
Type that represents a Ruby object.
Defines enum ruby_value_type.
static bool RB_TYPE_P(VALUE obj, enum ruby_value_type t)
Queries if the given object is of given type.