1 #ifndef INTERNAL_RATIONAL_H
2 #define INTERNAL_RATIONAL_H
11 #include "ruby/internal/config.h"
13 #include "internal/numeric.h"
14 #include "ruby_assert.h"
22 #define RRATIONAL(obj) ((struct RRational *)(obj))
33 VALUE rb_cstr_to_rat(
const char *,
int);
38 VALUE rb_rational_floor(
VALUE self,
int ndigits);
44 static inline void RATIONAL_SET_NUM(
VALUE r,
VALUE n);
45 static inline void RATIONAL_SET_DEN(
VALUE r,
VALUE d);
47 RUBY_SYMBOL_EXPORT_BEGIN
51 #if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
54 RUBY_SYMBOL_EXPORT_END
67 assert(INT_POSITIVE_P(d));
#define RB_INTEGER_TYPE_P
Old name of rb_integer_type_p.
#define RB_OBJ_WRITE(old, slot, young)
Declaration of a "back" pointer.
Ruby object's base components.
Internal header for Rational.
uintptr_t VALUE
Type that represents a Ruby object.