com php-src: pack(): Use SIZEOF_ZEND_LONG instead of SIZEOF_LONG: ext/standard/pack.c

From: Date: Thu, 09 Oct 2014 23:20:10 +0000
Subject: com php-src: pack(): Use SIZEOF_ZEND_LONG instead of SIZEOF_LONG: ext/standard/pack.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-82230@lists.php.net to get a copy of this message
Commit: 2a765d313ecf750dbb7f1b92b5c19981f57407ac Author: Tjerk Meesters <datibbaw@php.net> Fri, 10 Oct 2014 07:20:10 +0800 Parents: 284358b317d3066be12552bdc0ab7e0c032f6e29 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2a765d313ecf750dbb7f1b92b5c19981f57407ac Log: pack(): Use SIZEOF_ZEND_LONG instead of SIZEOF_LONG Changed paths: M ext/standard/pack.c Diff: diff --git a/ext/standard/pack.c b/ext/standard/pack.c index a690b7b..a95c226 100644 --- a/ext/standard/pack.c +++ b/ext/standard/pack.c @@ -82,7 +82,7 @@ static int machine_endian_long_map[4]; static int big_endian_long_map[4]; static int little_endian_long_map[4]; -#if SIZEOF_LONG > 4 +#if SIZEOF_ZEND_LONG > 4 /* Mappings of bytes from quads (64bit) for all endian environments */ static int machine_endian_longlong_map[8]; static int big_endian_longlong_map[8]; @@ -209,7 +209,7 @@ PHP_FUNCTION(pack) case 'Q': case 'J': case 'P': -#if SIZEOF_LONG < 8 +#if SIZEOF_ZEND_LONG < 8 efree(argv); efree(formatcodes); efree(formatargs); @@ -298,7 +298,7 @@ PHP_FUNCTION(pack) INC_OUTPUTPOS(arg,4) /* 32 bit per arg */ break; -#if SIZEOF_LONG > 4 +#if SIZEOF_ZEND_LONG > 4 case 'q': case 'Q': case 'J': @@ -457,7 +457,7 @@ PHP_FUNCTION(pack) break; } -#if SIZEOF_LONG > 4 +#if SIZEOF_ZEND_LONG > 4 case 'q': case 'Q': case 'J': @@ -471,7 +471,7 @@ PHP_FUNCTION(pack) } while (arg-- > 0) { - php_pack(argv[currentarg++], 8, map, &output[outputpos]); + php_pack(&argv[currentarg++], 8, map, &output[outputpos]); outputpos += 8; } break; @@ -675,7 +675,7 @@ PHP_FUNCTION(unpack) case 'Q': case 'J': case 'P': -#if SIZEOF_LONG > 4 +#if SIZEOF_ZEND_LONG > 4 size = 8; break; #else @@ -907,7 +907,7 @@ PHP_FUNCTION(unpack) break; } -#if SIZEOF_LONG > 4 +#if SIZEOF_ZEND_LONG > 4 case 'q': case 'Q': case 'J': @@ -1043,7 +1043,7 @@ PHP_MINIT_FUNCTION(pack) little_endian_long_map[2] = 2; little_endian_long_map[3] = 3; -#if SIZEOF_LONG > 4 +#if SIZEOF_ZEND_LONG > 4 machine_endian_longlong_map[0] = 0; machine_endian_longlong_map[1] = 1; machine_endian_longlong_map[2] = 2; @@ -1102,7 +1102,7 @@ PHP_MINIT_FUNCTION(pack) little_endian_long_map[2] = size - 3; little_endian_long_map[3] = size - 4; -#if SIZEOF_LONG > 4 +#if SIZEOF_ZEND_LONG > 4 machine_endian_longlong_map[0] = size - 8; machine_endian_longlong_map[1] = size - 7; machine_endian_longlong_map[2] = size - 6;

« previous php.cvs (#82230) next »