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))
33VALUE rb_cstr_to_rat(
const char *,
int);
38VALUE rb_rational_floor(
VALUE self,
int ndigits);
44static inline void RATIONAL_SET_NUM(
VALUE r,
VALUE n);
45static inline void RATIONAL_SET_DEN(
VALUE r,
VALUE d);
47RUBY_SYMBOL_EXPORT_BEGIN
51#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
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.