summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-05 23:00:59 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-05 23:00:59 +0000
commit0667aac9145c48753e950a891f21beced5648116 (patch)
treeba5ef002785514aab23839a24238892e3aef0add
parent2a58706e2d31abd5f708942254d46cda35aa60dd (diff)
Add a comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--pack.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/pack.c b/pack.c
index 70db20f992..aca562eef1 100644
--- a/pack.c
+++ b/pack.c
@@ -36,6 +36,19 @@ static const char natstr[] = "sSiIlL";
#endif
static const char endstr[] = "sSiIlLqQ";
+#ifdef NATINT_PACK
+# define NATINT_LEN(type,len) (natint?(int)sizeof(type):(int)(len))
+#else
+# define NATINT_LEN(type,len) ((int)sizeof(type))
+#endif
+
+#ifdef HAVE_TRUE_LONG_LONG
+/* It is intentional to use long long instead of LONG_LONG. */
+# define NATINT_LEN_Q NATINT_LEN(long long, 8)
+#else
+# define NATINT_LEN_Q 8
+#endif
+
#if SIZEOF_SHORT != 2 || SIZEOF_LONG != 4 || (defined(HAVE_TRUE_LONG_LONG) && SIZEOF_LONG_LONG != 8)
# define NATINT_PACK
#endif
@@ -62,18 +75,6 @@ static const char endstr[] = "sSiIlLqQ";
# define BIGENDIAN_P() 0
#endif
-#ifdef NATINT_PACK
-# define NATINT_LEN(type,len) (natint?(int)sizeof(type):(int)(len))
-#else
-# define NATINT_LEN(type,len) ((int)sizeof(type))
-#endif
-
-#ifdef HAVE_TRUE_LONG_LONG
-# define NATINT_LEN_Q NATINT_LEN(long long, 8)
-#else
-# define NATINT_LEN_Q 8
-#endif
-
#if SIZEOF_LONG == 8
# define INT64toNUM(x) LONG2NUM(x)
# define UINT64toNUM(x) ULONG2NUM(x)