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

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

size_t.h
Go to the documentation of this file.
1#ifndef RBIMPL_ARITHMETIC_SIZE_T_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_ARITHMETIC_SIZE_T_H
23#include "ruby/internal/config.h"
24#include "ruby/internal/arithmetic/int.h"
25#include "ruby/internal/arithmetic/long.h"
26#include "ruby/internal/arithmetic/long_long.h"
27#include "ruby/backward/2/long_long.h"
28
29#if defined(__DOXYGEN__)
30#
31# define RB_SIZE2NUM RB_ULONG2NUM
32#
33# define RB_SSIZE2NUM RB_LONG2NUM
34#elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG
35# define RB_SIZE2NUM RB_ULL2NUM
36# define RB_SSIZE2NUM RB_LL2NUM
37#elif SIZEOF_SIZE_T == SIZEOF_LONG
38# define RB_SIZE2NUM RB_ULONG2NUM
39# define RB_SSIZE2NUM RB_LONG2NUM
40#else
41# define RB_SIZE2NUM RB_UINT2NUM
42# define RB_SSIZE2NUM RB_INT2NUM
43#endif
44
45#if defined(__DOXYGEN__)
46#
47# define RB_NUM2SIZE RB_NUM2ULONG
48#
49# define RB_NUM2SSIZE RB_NUM2LONG
50#elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG
51# define RB_NUM2SIZE RB_NUM2ULL
52# define RB_NUM2SSIZE RB_NUM2LL
53#elif SIZEOF_SIZE_T == SIZEOF_LONG
54# define RB_NUM2SIZE RB_NUM2ULONG
55# define RB_NUM2SSIZE RB_NUM2LONG
56#else
57# define RB_NUM2SIZE RB_NUM2UINT
58# define RB_NUM2SSIZE RB_NUM2INT
59#endif
60
61#define NUM2SIZET RB_NUM2SIZE
62#define SIZET2NUM RB_SIZE2NUM
63#define NUM2SSIZET RB_NUM2SSIZE
64#define SSIZET2NUM RB_SSIZE2NUM
66#endif /* RBIMPL_ARITHMETIC_SIZE_T_H */
long_long.h
Defines old LONG_LONG.
int.h
Arithmetic conversion between C's int and Ruby's.
long_long.h
Arithmetic conversion between C's long long and Ruby's.
long.h
Arithmetic conversion between C's long and Ruby's.