[前][次][番号順一覧][スレッド一覧]

ruby-changes:28091

From: akr <ko1@a...>
Date: Sat, 6 Apr 2013 08:01:11 +0900 (JST)
Subject: [ruby-changes:28091] akr:r40143 (trunk): Add a comment.

akr	2013-04-06 08:00:59 +0900 (Sat, 06 Apr 2013)

  New Revision: 40143

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40143

  Log:
    Add a comment.

  Modified files:
    trunk/pack.c

Index: pack.c
===================================================================
--- pack.c	(revision 40142)
+++ pack.c	(revision 40143)
@@ -36,6 +36,19 @@ static const char natstr[] = "sSiIlL"; https://github.com/ruby/ruby/blob/trunk/pack.c#L36
 #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"; https://github.com/ruby/ruby/blob/trunk/pack.c#L75
 # 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)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]