From edebae9ac945f18ec001ed8998f3b5f84bf0b596 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 19 Sep 2022 08:42:57 +0200 Subject: update to 5.1.22 --- PHPINFO | 6 +- REFLECTION | 78 +++-- apcu-php82.patch | 948 ----------------------------------------------------- php-pecl-apcu.spec | 26 +- 4 files changed, 64 insertions(+), 994 deletions(-) delete mode 100644 apcu-php82.patch diff --git a/PHPINFO b/PHPINFO index 1f5dd59..4ffdfc8 100644 --- a/PHPINFO +++ b/PHPINFO @@ -2,12 +2,12 @@ apcu APCu Support => Enabled -Version => 5.1.21 +Version => 5.1.22 APCu Debugging => Disabled MMAP Support => Enabled -MMAP File Mask => /tmp/apc.oFwhY6 +MMAP File Mask => /tmp/apc.DGbixt Serialization Support => php, igbinary, lz4, snappy, zstd -Build Date => Oct 7 2021 00:00:00 +Build Date => Sep 19 2022 00:00:00 Directive => Local Value => Master Value apc.enabled => On => On diff --git a/REFLECTION b/REFLECTION index 5f69c01..404153e 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #68 apcu version 5.1.21 ] { +Extension [ extension #68 apcu version 5.1.22 ] { - INI { Entry [ apc.enabled ] @@ -46,7 +46,7 @@ Extension [ extension #68 apcu version 5.1.21 ] { } - Constants [16] { - Constant [ int ] { 140118005428656 } + Constant [ int ] { 139969585086944 } Constant [ int APC_LIST_ACTIVE ] { 1 } Constant [ int APC_LIST_DELETED ] { 2 } Constant [ int APC_ITER_TYPE ] { 1 } @@ -69,98 +69,112 @@ Extension [ extension #68 apcu version 5.1.21 ] { - Parameters [0] { } + - Return [ bool ] } Function [ function apcu_cache_info ] { - Parameters [1] { - Parameter #0 [ $limited ] + Parameter #0 [ bool $limited = false ] } + - Return [ array|false ] } Function [ function apcu_key_info ] { - Parameters [1] { - Parameter #0 [ $key ] + Parameter #0 [ string $key ] } + - Return [ ?array ] } Function [ function apcu_sma_info ] { - Parameters [1] { - Parameter #0 [ $limited ] + Parameter #0 [ bool $limited = false ] } + - Return [ array|false ] } Function [ function apcu_enabled ] { - Parameters [0] { } + - Return [ bool ] } Function [ function apcu_store ] { - Parameters [3] { Parameter #0 [ $key ] - Parameter #1 [ $value ] - Parameter #2 [ $ttl ] + Parameter #1 [ mixed $value = ] + Parameter #2 [ int $ttl = 0 ] } + - Return [ array|bool ] } Function [ function apcu_add ] { - Parameters [3] { Parameter #0 [ $key ] - Parameter #1 [ $value ] - Parameter #2 [ $ttl ] + Parameter #1 [ mixed $value = ] + Parameter #2 [ int $ttl = 0 ] } + - Return [ array|bool ] } Function [ function apcu_inc ] { - Parameters [4] { - Parameter #0 [ $key ] - Parameter #1 [ $step ] - Parameter #2 [ &$success ] - Parameter #3 [ $ttl ] + Parameter #0 [ string $key ] + Parameter #1 [ int $step = 1 ] + Parameter #2 [ &$success = null ] + Parameter #3 [ int $ttl = 0 ] } + - Return [ int|false ] } Function [ function apcu_dec ] { - Parameters [4] { - Parameter #0 [ $key ] - Parameter #1 [ $step ] - Parameter #2 [ &$success ] - Parameter #3 [ $ttl ] + Parameter #0 [ string $key ] + Parameter #1 [ int $step = 1 ] + Parameter #2 [ &$success = null ] + Parameter #3 [ int $ttl = 0 ] } + - Return [ int|false ] } Function [ function apcu_cas ] { - Parameters [3] { - Parameter #0 [ $key ] - Parameter #1 [ $old ] - Parameter #2 [ $new ] + Parameter #0 [ string $key ] + Parameter #1 [ int $old ] + Parameter #2 [ int $new ] } + - Return [ bool ] } Function [ function apcu_fetch ] { - Parameters [2] { Parameter #0 [ $key ] - Parameter #1 [ &$success ] + Parameter #1 [ &$success = null ] } + - Return [ mixed ] } Function [ function apcu_exists ] { - Parameters [1] { Parameter #0 [ $key ] } + - Return [ array|bool ] } Function [ function apcu_delete ] { - Parameters [1] { Parameter #0 [ $key ] } + - Return [ array|bool ] } Function [ function apcu_entry ] { - Parameters [3] { - Parameter #0 [ $key ] - Parameter #1 [ $callback ] - Parameter #2 [ $ttl ] + Parameter #0 [ string $key ] + Parameter #1 [ callable $callback ] + Parameter #2 [ int $ttl = 0 ] } + - Return [ mixed ] } } @@ -183,10 +197,10 @@ Extension [ extension #68 apcu version 5.1.21 ] { Method [ public method __construct ] { - Parameters [4] { - Parameter #0 [ $search ] - Parameter #1 [ $format ] - Parameter #2 [ $chunk_size ] - Parameter #3 [ $list ] + Parameter #0 [ $search = null ] + Parameter #1 [ int $format = APC_ITER_ALL ] + Parameter #2 [ int $chunk_size = 0 ] + Parameter #3 [ int $list = APC_LIST_ACTIVE ] } } @@ -194,48 +208,56 @@ Extension [ extension #68 apcu version 5.1.21 ] { - Parameters [0] { } + - Return [ void ] } Method [ public method next ] { - Parameters [0] { } + - Return [ void ] } Method [ public method valid ] { - Parameters [0] { } + - Return [ bool ] } Method [ public method key ] { - Parameters [0] { } + - Return [ string|int ] } Method [ public method current ] { - Parameters [0] { } + - Return [ mixed ] } Method [ public method getTotalHits ] { - Parameters [0] { } + - Return [ int ] } Method [ public method getTotalSize ] { - Parameters [0] { } + - Return [ int ] } Method [ public method getTotalCount ] { - Parameters [0] { } + - Return [ int ] } } } diff --git a/apcu-php82.patch b/apcu-php82.patch deleted file mode 100644 index 285bbc7..0000000 --- a/apcu-php82.patch +++ /dev/null @@ -1,948 +0,0 @@ -diff --git a/apc.h b/apc.h -index 4a011ee..a00f560 100644 ---- a/apc.h -+++ b/apc.h -@@ -76,13 +76,6 @@ PHP_APCU_API void apc_debug(const char *format, ...) ZEND_ATTRIBUTE_FORMAT(print - /* apc_flip_hash flips keys and values for faster searching */ - PHP_APCU_API HashTable* apc_flip_hash(HashTable *hash); - --#define apc_time() \ -- (APCG(use_request_time) \ -- ? (APCG(request_time) \ -- ? APCG(request_time) \ -- : (APCG(request_time) = (time_t) sapi_get_request_time())) \ -- : time(0)) -- - #if defined(__GNUC__) - # define APC_UNUSED __attribute__((unused)) - # define APC_USED __attribute__((used)) -@@ -131,7 +124,7 @@ PHP_APCU_API int _apc_register_serializer( - - /* {{{ apc_get_serializers - fetches the list of serializers */ --PHP_APCU_API apc_serializer_t* apc_get_serializers(); /* }}} */ -+PHP_APCU_API apc_serializer_t* apc_get_serializers(void); /* }}} */ - - /* {{{ apc_find_serializer - finds a previously registered serializer by name */ -diff --git a/apc.php b/apc.php -index 76c7a6b..dd143b3 100644 ---- a/apc.php -+++ b/apc.php -@@ -228,48 +228,53 @@ if (isset($MYREQUEST['IMG'])) - - function fill_arc($im, $centerX, $centerY, $diameter, $start, $end, $color1,$color2,$text='',$placeindex=0) { - $r=$diameter/2; -- $w=deg2rad((360+$start+($end-$start)/2)%360); -- -+ $w=deg2rad(round(360+$start+($end-$start)/2)%360); - - if (function_exists("imagefilledarc")) { - // exists only if GD 2.0.1 is available -- imagefilledarc($im, $centerX+1, $centerY+1, $diameter, $diameter, $start, $end, $color1, IMG_ARC_PIE); -- imagefilledarc($im, $centerX, $centerY, $diameter, $diameter, $start, $end, $color2, IMG_ARC_PIE); -- imagefilledarc($im, $centerX, $centerY, $diameter, $diameter, $start, $end, $color1, IMG_ARC_NOFILL|IMG_ARC_EDGED); -+ imagefilledarc($im, $centerX+1, $centerY+1, $diameter, $diameter, round($start), round($end), $color1, IMG_ARC_PIE); -+ imagefilledarc($im, $centerX, $centerY, $diameter, $diameter, round($start), round($end), $color2, IMG_ARC_PIE); -+ imagefilledarc($im, $centerX, $centerY, $diameter, $diameter, round($start), round($end), $color1, IMG_ARC_NOFILL|IMG_ARC_EDGED); - } else { -- imagearc($im, $centerX, $centerY, $diameter, $diameter, $start, $end, $color2); -- imageline($im, $centerX, $centerY, $centerX + cos(deg2rad($start)) * $r, $centerY + sin(deg2rad($start)) * $r, $color2); -- imageline($im, $centerX, $centerY, $centerX + cos(deg2rad($start+1)) * $r, $centerY + sin(deg2rad($start)) * $r, $color2); -- imageline($im, $centerX, $centerY, $centerX + cos(deg2rad($end-1)) * $r, $centerY + sin(deg2rad($end)) * $r, $color2); -- imageline($im, $centerX, $centerY, $centerX + cos(deg2rad($end)) * $r, $centerY + sin(deg2rad($end)) * $r, $color2); -- imagefill($im,$centerX + $r*cos($w)/2, $centerY + $r*sin($w)/2, $color2); -+ imagearc($im, $centerX, $centerY, $diameter, $diameter, round($start), round($end), $color2); -+ imageline($im, $centerX, $centerY, $centerX + round(cos(deg2rad($start)) * $r), $centerY + round(sin(deg2rad($start)) * $r), $color2); -+ imageline($im, $centerX, $centerY, $centerX + round(cos(deg2rad($start+1)) * $r), $centerY + round(sin(deg2rad($start)) * $r), $color2); -+ imageline($im, $centerX, $centerY, $centerX + round(cos(deg2rad($end-1)) * $r), $centerY + round(sin(deg2rad($end)) * $r), $color2); -+ imageline($im, $centerX, $centerY, $centerX + round(cos(deg2rad($end)) * $r), $centerY + round(sin(deg2rad($end)) * $r), $color2); -+ imagefill($im,$centerX + round($r*cos($w)/2), $centerY + round($r*sin($w)/2), $color2); - } - if ($text) { - if ($placeindex>0) { -- imageline($im,$centerX + $r*cos($w)/2, $centerY + $r*sin($w)/2,$diameter, $placeindex*12,$color1); -+ imageline($im,$centerX + round($r*cos($w)/2), $centerY + round($r*sin($w)/2),$diameter, $placeindex*12,$color1); - imagestring($im,4,$diameter, $placeindex*12,$text,$color1); - - } else { -- imagestring($im,4,$centerX + $r*cos($w)/2, $centerY + $r*sin($w)/2,$text,$color1); -+ imagestring($im,4,$centerX + round($r*cos($w)/2), $centerY + round($r*sin($w)/2),$text,$color1); - } - } - } - - function text_arc($im, $centerX, $centerY, $diameter, $start, $end, $color1,$text,$placeindex=0) { - $r=$diameter/2; -- $w=deg2rad((360+$start+($end-$start)/2)%360); -+ $w=deg2rad((360+round($start)+round(($end-$start)/2))%360); - - if ($placeindex>0) { -- imageline($im,$centerX + $r*cos($w)/2, $centerY + $r*sin($w)/2,$diameter, $placeindex*12,$color1); -+ imageline($im,$centerX + round($r*cos($w)/2), $centerY + round($r*sin($w)/2),$diameter, $placeindex*12,$color1); - imagestring($im,4,$diameter, $placeindex*12,$text,$color1); - - } else { -- imagestring($im,4,$centerX + $r*cos($w)/2, $centerY + $r*sin($w)/2,$text,$color1); -+ imagestring($im,4,$centerX + round($r*cos($w)/2), $centerY + round($r*sin($w)/2),$text,$color1); - } - } - - function fill_box($im, $x, $y, $w, $h, $color1, $color2,$text='',$placeindex='') { - global $col_black; -+ -+ $x = round($x); -+ $y = round($y); -+ $w = round($w); -+ $h = round($h); -+ - $x1=$x+$w-1; - $y1=$y+$h-1; - -@@ -285,7 +290,7 @@ if (isset($MYREQUEST['IMG'])) - $px=5; - $py=$placeindex*12+6; - imagefilledrectangle($im, $px+90, $py+3, $px+90-4, $py-3, $color2); -- imageline($im,$x,$y+$h/2,$px+90,$py,$color2); -+ imageline($im,$x,$y+round($h/2),$px+90,$py,$color2); - imagestring($im,2,$px,$py-6,$text,$color1); - - } else { -@@ -297,7 +302,7 @@ if (isset($MYREQUEST['IMG'])) - $py=($placeindex%15)*12+6; - } - imagefilledrectangle($im, $px, $py+3, $px-4, $py-3, $color2); -- imageline($im,$x+$w,$y+$h/2,$px,$py,$color2); -+ imageline($im,$x+$w,$y+round($h/2),$px,$py,$color2); - imagestring($im,2,$px+2,$py-6,$text,$color1); - } - } else { -@@ -707,7 +712,7 @@ input { - -
-

-- -+ -
User Cache
-

-