summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2025-12-10 12:09:50 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2025-12-10 12:09:50 +0900
commit3636277dc5837bcedcd5ef43d49423194064a676 (patch)
tree8d50cad7d133de530580817345e3ec430464c4e0 /internal
parent3bb97e7707a0be8c371cb9c704cb1e21062e1fc6 (diff)
Add `NUM2PTR` and `PTR2NUM` macros
These macros have been defined here and there, so collect them.
Diffstat (limited to 'internal')
-rw-r--r--internal/box.h10
1 files changed, 0 insertions, 10 deletions
diff --git a/internal/box.h b/internal/box.h
index 72263cc9dc..b62b6a9bc9 100644
--- a/internal/box.h
+++ b/internal/box.h
@@ -3,16 +3,6 @@
#include "ruby/ruby.h" /* for VALUE */
-#if SIZEOF_VALUE <= SIZEOF_LONG
-# define SVALUE2NUM(x) LONG2NUM((long)(x))
-# define NUM2SVALUE(x) (SIGNED_VALUE)NUM2LONG(x)
-#elif SIZEOF_VALUE <= SIZEOF_LONG_LONG
-# define SVALUE2NUM(x) LL2NUM((LONG_LONG)(x))
-# define NUM2SVALUE(x) (SIGNED_VALUE)NUM2LL(x)
-#else
-# error Need integer for VALUE
-#endif
-
/**
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.