Ruby: include/ruby/internal/arithmetic/double.h Source File

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

double.h
Go to the documentation of this file.
1#ifndef RBIMPL_ARITHMETIC_DOUBLE_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_ARITHMETIC_DOUBLE_H
23#include "ruby/internal/attr/pure.h"
24#include "ruby/internal/dllexport.h"
25#include "ruby/internal/value.h"
26
27#define NUM2DBL rb_num2dbl
28#define RFLOAT_VALUE rb_float_value
29#define DBL2NUM rb_float_new
30
31 RBIMPL_SYMBOL_EXPORT_BEGIN()
32double rb_num2dbl(VALUE);
33 RBIMPL_ATTR_PURE()
34double rb_float_value(VALUE);
35 VALUE rb_float_new(double);
36 VALUE rb_float_new_in_heap(double);
37 RBIMPL_SYMBOL_EXPORT_END()
38
39#endif /* RBIMPL_ARITHMETIC_DOUBLE_H */
dllexport.h
Tewaking visibility of C variables/functions.
RBIMPL_SYMBOL_EXPORT_END
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition: dllexport.h:86
RBIMPL_SYMBOL_EXPORT_BEGIN
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition: dllexport.h:77
rb_float_new_in_heap
VALUE rb_float_new_in_heap(double)
Definition: numeric.c:922
rb_num2dbl
double rb_num2dbl(VALUE)
Converts a Numeric object to double.
Definition: object.c:3635
rb_float_value
#define rb_float_value
Definition: numeric.h:94
rb_float_new
#define rb_float_new
Definition: numeric.h:95
pure.h
Defines RBIMPL_ATTR_PURE.
RBIMPL_ATTR_PURE
#define RBIMPL_ATTR_PURE()
Wraps (or simulates) __attribute__((pure))
Definition: pure.h:33
value.h
Defines VALUE and ID.
VALUE
unsigned long VALUE
Definition: value.h:38