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

Ruby 4.0.6p0 (2026-07-14 revision 03b6d3f8898a28604fe6cb00eae3226b821168f4)

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
65
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.