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

Ruby 3.2.5p208 (2024-07-26 revision 31d0f1a2e7dbfb60731d1f05b868e1d578cda493)

intptr_t.h
Go to the documentation of this file.
1#ifndef RBIMPL_ARITHMETIC_INTPTR_T_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_ARITHMETIC_INTPTR_T_H
23#include "ruby/internal/config.h"
24
25#ifdef HAVE_STDINT_H
26# include <stdint.h>
27#endif
28
29#include "ruby/internal/value.h"
30#include "ruby/internal/dllexport.h"
31
32#define rb_int_new rb_int2inum
33#define rb_uint_new rb_uint2inum
35 RBIMPL_SYMBOL_EXPORT_BEGIN()
36
37
45 VALUE rb_int2big(intptr_t i);
46
53 VALUE rb_int2inum(intptr_t i);
54
63 VALUE rb_uint2big(uintptr_t i);
64
71 VALUE rb_uint2inum(uintptr_t i);
72 RBIMPL_SYMBOL_EXPORT_END()
73
74#endif /* RBIMPL_ARITHMETIC_INTPTR_T_H */
dllexport.h
Tweaking visibility of C variables/functions.
RBIMPL_SYMBOL_EXPORT_END
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition dllexport.h:106
RBIMPL_SYMBOL_EXPORT_BEGIN
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition dllexport.h:97
rb_int2inum
VALUE rb_int2inum(intptr_t i)
Converts a C's intptr_t into an instance of rb_cInteger.
Definition bignum.c:3237
rb_uint2big
VALUE rb_uint2big(uintptr_t i)
Converts a C's intptr_t into an instance of rb_cInteger.
Definition bignum.c:3187
rb_int2big
VALUE rb_int2big(intptr_t i)
Converts a C's intptr_t into an instance of rb_cInteger.
Definition bignum.c:3209
rb_uint2inum
VALUE rb_uint2inum(uintptr_t i)
Converts a C's uintptr_t into an instance of rb_cInteger.
Definition bignum.c:3230
value.h
Defines VALUE and ID.
VALUE
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40