* pack.c (NATINT_LEN): fix definition order, must be after
  NATINT_PACK.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-04-06 00:54:23 +00:00
Родитель 37872dbf2b
Коммит c3fcd1b871
2 изменённых файлов: 16 добавлений и 6 удалений

Просмотреть файл

@ -1,3 +1,13 @@
Sat Apr 6 09:54:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* pack.c (NATINT_LEN): fix definition order, must be after
NATINT_PACK.
Sat Apr 6 09:47:37 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* pack.c (NATINT_LEN): fix definition order, must be after
NATINT_PACK.
Sat Apr 6 03:11:07 2013 Aaron Patterson <aaron@tenderlovemaking.com>
* ext/psych/lib/psych/visitors/yaml_tree.rb: fix symbol keys in coder

12
pack.c
Просмотреть файл

@ -36,12 +36,6 @@ 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)
@ -75,6 +69,12 @@ 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
#if SIZEOF_LONG == 8
# define INT64toNUM(x) LONG2NUM(x)
# define UINT64toNUM(x) ULONG2NUM(x)