summaryrefslogtreecommitdiff
path: root/include/ruby/3/arithmetic
diff options
context:
space:
mode:
Diffstat (limited to 'include/ruby/3/arithmetic')
-rw-r--r--include/ruby/3/arithmetic/char.h6
-rw-r--r--include/ruby/3/arithmetic/double.h6
-rw-r--r--include/ruby/3/arithmetic/fixnum.h6
-rw-r--r--include/ruby/3/arithmetic/gid_t.h6
-rw-r--r--include/ruby/3/arithmetic/int.h6
-rw-r--r--include/ruby/3/arithmetic/intptr_t.h6
-rw-r--r--include/ruby/3/arithmetic/long.h6
-rw-r--r--include/ruby/3/arithmetic/long_long.h6
-rw-r--r--include/ruby/3/arithmetic/mode_t.h6
-rw-r--r--include/ruby/3/arithmetic/off_t.h6
-rw-r--r--include/ruby/3/arithmetic/pid_t.h6
-rw-r--r--include/ruby/3/arithmetic/short.h6
-rw-r--r--include/ruby/3/arithmetic/size_t.h6
-rw-r--r--include/ruby/3/arithmetic/st_data_t.h6
-rw-r--r--include/ruby/3/arithmetic/uid_t.h6
15 files changed, 57 insertions, 33 deletions
diff --git a/include/ruby/3/arithmetic/char.h b/include/ruby/3/arithmetic/char.h
index 94329b7a9e..03afa0a406 100644
--- a/include/ruby/3/arithmetic/char.h
+++ b/include/ruby/3/arithmetic/char.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY3_ARITHMETIC_CHAR_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY3_ARITHMETIC_CHAR_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Arithmetic conversion between C's `char` and Ruby's.
*/
-#ifndef RUBY3_ARITHMETIC_CHAR_H
-#define RUBY3_ARITHMETIC_CHAR_H
#include "ruby/3/arithmetic/int.h" /* NUM2INT is here, but */
#include "ruby/3/arithmetic/long.h" /* INT2FIX is here.*/
#include "ruby/3/attr/artificial.h"
diff --git a/include/ruby/3/arithmetic/double.h b/include/ruby/3/arithmetic/double.h
index 82e9fdc3b1..4a37611a21 100644
--- a/include/ruby/3/arithmetic/double.h
+++ b/include/ruby/3/arithmetic/double.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY3_ARITHMETIC_DOUBLE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY3_ARITHMETIC_DOUBLE_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Arithmetic conversion between C's `double` and Ruby's.
*/
-#ifndef RUBY3_ARITHMETIC_DOUBLE_H
-#define RUBY3_ARITHMETIC_DOUBLE_H
#include "ruby/3/attr/pure.h"
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
diff --git a/include/ruby/3/arithmetic/fixnum.h b/include/ruby/3/arithmetic/fixnum.h
index e995b5f3f8..d7214e080b 100644
--- a/include/ruby/3/arithmetic/fixnum.h
+++ b/include/ruby/3/arithmetic/fixnum.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY3_ARITHMETIC_FIXNUM_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY3_ARITHMETIC_FIXNUM_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Handling of integers formerly known as Fixnums.
*/
-#ifndef RUBY3_ARITHMETIC_FIXNUM_H
-#define RUBY3_ARITHMETIC_FIXNUM_H
#include "ruby/backward/2/limits.h"
#define FIXABLE RB_FIXABLE
diff --git a/include/ruby/3/arithmetic/gid_t.h b/include/ruby/3/arithmetic/gid_t.h
index ebdd4d21f6..7c4c1b00ed 100644
--- a/include/ruby/3/arithmetic/gid_t.h
+++ b/include/ruby/3/arithmetic/gid_t.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY3_ARITHMETIC_GID_T_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY3_ARITHMETIC_GID_T_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -28,3 +30,5 @@
#ifndef NUM2GIDT
# define NUM2GIDT RB_NUM2LONG
#endif
+
+#endif /* RUBY3_ARITHMETIC_GID_T_H */
diff --git a/include/ruby/3/arithmetic/int.h b/include/ruby/3/arithmetic/int.h
index 36485167cc..8c2e9f2bd8 100644
--- a/include/ruby/3/arithmetic/int.h
+++ b/include/ruby/3/arithmetic/int.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY3_ARITHMETIC_INT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY3_ARITHMETIC_INT_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Arithmetic conversion between C's `int` and Ruby's.
*/
-#ifndef RUBY3_ARITHMETIC_INT_H
-#define RUBY3_ARITHMETIC_INT_H
#include "ruby/3/config.h"
#include "ruby/3/arithmetic/fixnum.h"
#include "ruby/3/arithmetic/intptr_t.h"
diff --git a/include/ruby/3/arithmetic/intptr_t.h b/include/ruby/3/arithmetic/intptr_t.h
index fd8043a10d..7eabf75a80 100644
--- a/include/ruby/3/arithmetic/intptr_t.h
+++ b/include/ruby/3/arithmetic/intptr_t.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY3_ARITHMETIC_INTPTR_T_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY3_ARITHMETIC_INTPTR_T_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Arithmetic conversion between C's `intptr_t` and Ruby's.
*/
-#ifndef RUBY3_ARITHMETIC_INTPTR_T_H
-#define RUBY3_ARITHMETIC_INTPTR_T_H
#include "ruby/3/config.h"
#ifdef HAVE_STDINT_H
diff --git a/include/ruby/3/arithmetic/long.h b/include/ruby/3/arithmetic/long.h
index 7925669baf..46ff76d63e 100644
--- a/include/ruby/3/arithmetic/long.h
+++ b/include/ruby/3/arithmetic/long.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY3_ARITHMETIC_LONG_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY3_ARITHMETIC_LONG_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -26,8 +28,6 @@
* understand the difference of `int` and `long` when they designed those
* macros.
*/
-#ifndef RUBY3_ARITHMETIC_LONG_H
-#define RUBY3_ARITHMETIC_LONG_H
#include "ruby/3/config.h"
#include "ruby/3/arithmetic/fixnum.h" /* FIXABLE */
#include "ruby/3/arithmetic/intptr_t.h" /* rb_int2big etc.*/
diff --git a/include/ruby/3/arithmetic/long_long.h b/include/ruby/3/arithmetic/long_long.h
index 571edfe8c4..1dfe0f6f71 100644
--- a/include/ruby/3/arithmetic/long_long.h
+++ b/include/ruby/3/arithmetic/long_long.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY3_ARITHMETIC_LONG_LONG_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY3_ARITHMETIC_LONG_LONG_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Arithmetic conversion between C's `long long` and Ruby's.
*/
-#ifndef RUBY3_ARITHMETIC_LONG_LONG_H
-#define RUBY3_ARITHMETIC_LONG_LONG_H
#include "ruby/3/value.h"
#include "ruby/3/dllexport.h"
#include "ruby/3/special_consts.h"
diff --git a/include/ruby/3/arithmetic/mode_t.h b/include/ruby/3/arithmetic/mode_t.h
index 54ccd376f8..ea6386305a 100644
--- a/include/ruby/3/arithmetic/mode_t.h
+++ b/include/ruby/3/arithmetic/mode_t.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY3_ARITHMETIC_MODE_T_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY3_ARITHMETIC_MODE_T_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -28,3 +30,5 @@
#ifndef MODET2NUM
# define MODET2NUM RB_INT2NUM
#endif
+
+#endif /* RUBY3_ARITHMETIC_MODE_T_H */
diff --git a/include/ruby/3/arithmetic/off_t.h b/include/ruby/3/arithmetic/off_t.h
index dd964b5446..03d0756257 100644
--- a/include/ruby/3/arithmetic/off_t.h
+++ b/include/ruby/3/arithmetic/off_t.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY3_ARITHMETIC_OFF_T_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY3_ARITHMETIC_OFF_T_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -43,3 +45,5 @@
#else
# define NUM2OFFT RB_NUM2INT
#endif
+
+#endif /* RUBY3_ARITHMETIC_OFF_T_H */
diff --git a/include/ruby/3/arithmetic/pid_t.h b/include/ruby/3/arithmetic/pid_t.h
index bca0248d2a..e63d9e3049 100644
--- a/include/ruby/3/arithmetic/pid_t.h
+++ b/include/ruby/3/arithmetic/pid_t.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY3_ARITHMETIC_PID_T_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY3_ARITHMETIC_PID_T_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -28,3 +30,5 @@
#ifndef NUM2PIDT
# define NUM2PIDT RB_NUM2LONG
#endif
+
+#endif /* RUBY3_ARITHMETIC_PID_T_H */
diff --git a/include/ruby/3/arithmetic/short.h b/include/ruby/3/arithmetic/short.h
index fd2106c216..4fb07a8d03 100644
--- a/include/ruby/3/arithmetic/short.h
+++ b/include/ruby/3/arithmetic/short.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY3_ARITHMETIC_SHORT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY3_ARITHMETIC_SHORT_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -21,8 +23,6 @@
* Shyouhei wonders: why there is no SHORT2NUM, given there are both
* #USHORT2NUM and #CHR2FIX?
*/
-#ifndef RUBY3_ARITHMETIC_SHORT_H
-#define RUBY3_ARITHMETIC_SHORT_H
#include "ruby/3/value.h"
#include "ruby/3/dllexport.h"
#include "ruby/3/special_consts.h"
diff --git a/include/ruby/3/arithmetic/size_t.h b/include/ruby/3/arithmetic/size_t.h
index 70161c3ab0..848a3f1271 100644
--- a/include/ruby/3/arithmetic/size_t.h
+++ b/include/ruby/3/arithmetic/size_t.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY3_ARITHMETIC_SIZE_T_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY3_ARITHMETIC_SIZE_T_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -45,3 +47,5 @@
# define NUM2SIZET RB_NUM2UINT
# define NUM2SSIZET RB_NUM2INT
#endif
+
+#endif /* RUBY3_ARITHMETIC_SIZE_T_H */
diff --git a/include/ruby/3/arithmetic/st_data_t.h b/include/ruby/3/arithmetic/st_data_t.h
index a4917a42f4..f9a28ce1db 100644
--- a/include/ruby/3/arithmetic/st_data_t.h
+++ b/include/ruby/3/arithmetic/st_data_t.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY3_ARITHMERIC_ST_DATA_T_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY3_ARITHMERIC_ST_DATA_T_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Arithmetic conversion between C's `st_data_t` and Ruby's.
*/
-#ifndef RUBY3_ARITHMERIC_ST_DATA_T_H
-#define RUBY3_ARITHMERIC_ST_DATA_T_H
#include "ruby/3/arithmetic/fixnum.h"
#include "ruby/3/arithmetic/long.h"
#include "ruby/3/attr/artificial.h"
diff --git a/include/ruby/3/arithmetic/uid_t.h b/include/ruby/3/arithmetic/uid_t.h
index 45b1f5a9ca..c49b79e934 100644
--- a/include/ruby/3/arithmetic/uid_t.h
+++ b/include/ruby/3/arithmetic/uid_t.h
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
+#ifndef RUBY3_ARITHMETIC_UID_T_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY3_ARITHMETIC_UID_T_H
+/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
@@ -28,3 +30,5 @@
#ifndef NUM2UIDT
# define NUM2UIDT RB_NUM2LONG
#endif
+
+#endif /* RUBY3_ARITHMETIC_UID_T_H */