Ruby  3.4.0dev (2024-11-22 revision 37a72b0150ec36b4ea27175039afc28c62207b0c)
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"
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 */
Defines old LONG_LONG.
Arithmetic conversion between C's int and Ruby's.
Arithmetic conversion between C's long long and Ruby's.
Arithmetic conversion between C's long and Ruby's.