1#ifndef INTERNAL_RATIONAL_H
2#define INTERNAL_RATIONAL_H
11#include "ruby/internal/config.h"
13#include "internal/gc.h"
14#include "internal/numeric.h"
15#include "ruby_assert.h"
23#define RRATIONAL(obj) ((struct RRational *)(obj))
34VALUE rb_cstr_to_rat(
const char *,
int);
39VALUE rb_rational_floor(
VALUE self,
int ndigits);
45static inline void RATIONAL_SET_NUM(
VALUE r,
VALUE n);
46static inline void RATIONAL_SET_DEN(
VALUE r,
VALUE d);
48RUBY_SYMBOL_EXPORT_BEGIN
52#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
68 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's object's, base components.
Internal header for Rational.
uintptr_t VALUE
Type that represents a Ruby object.