summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2020-08-26 09:06:09 +1200
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2020-09-06 15:37:54 +1200
commitc12b2703bc05f8c7eaaace49253f63a5e0f28273 (patch)
treeef06316e8c6a887ff4409f02aded73af067a4c94
parent40c06e6fe1fe75758e490173b900beb3da62c4a8 (diff)
downloadruby-c12b2703bc05f8c7eaaace49253f63a5e0f28273.tar.gz
Add `RB_` prefix for size_t to number conversion.
-rw-r--r--include/ruby/internal/arithmetic/size_t.h29
1 files changed, 17 insertions, 12 deletions
diff --git a/include/ruby/internal/arithmetic/size_t.h b/include/ruby/internal/arithmetic/size_t.h
index 8341c80a35..0458f1f5f3 100644
--- a/include/ruby/internal/arithmetic/size_t.h
+++ b/include/ruby/internal/arithmetic/size_t.h
@@ -27,25 +27,30 @@
#include "ruby/backward/2/long_long.h"
#if SIZEOF_SIZE_T == SIZEOF_LONG_LONG
-# define SIZET2NUM RB_ULL2NUM
-# define SSIZET2NUM RB_LL2NUM
+# define RB_SIZE2NUM RB_ULL2NUM
+# define RB_SSIZE2NUM RB_LL2NUM
#elif SIZEOF_SIZE_T == SIZEOF_LONG
-# define SIZET2NUM RB_ULONG2NUM
-# define SSIZET2NUM RB_LONG2NUM
+# define RB_SIZE2NUM RB_ULONG2NUM
+# define RB_SSIZE2NUM RB_LONG2NUM
#else
-# define SIZET2NUM RB_UINT2NUM
-# define SSIZET2NUM RB_INT2NUM
+# define RB_SIZE2NUM RB_UINT2NUM
+# define RB_SSIZE2NUM RB_INT2NUM
#endif
#if SIZEOF_SIZE_T == SIZEOF_LONG_LONG
-# define NUM2SIZET RB_NUM2ULL
-# define NUM2SSIZET RB_NUM2LL
+# define RB_NUM2SIZE RB_NUM2ULL
+# define RB_NUM2SSIZE RB_NUM2LL
#elif SIZEOF_SIZE_T == SIZEOF_LONG
-# define NUM2SIZET RB_NUM2ULONG
-# define NUM2SSIZET RB_NUM2LONG
+# define RB_NUM2SIZE RB_NUM2ULONG
+# define RB_NUM2SSIZE RB_NUM2LONG
#else
-# define NUM2SIZET RB_NUM2UINT
-# define NUM2SSIZET RB_NUM2INT
+# define RB_NUM2SIZE RB_NUM2UINT
+# define RB_NUM2SSIZE RB_NUM2INT
#endif
+#define NUM2SIZET RB_NUM2SIZE
+#define SIZET2NUM RB_SIZE2NUM
+#define NUM2SSIZET RB_NUM2SSIZE
+#define SSIZET2NUM RB_SSIZE2NUM
+
#endif /* RBIMPL_ARITHMETIC_SIZE_T_H */