diff options
| author | Remi Collet <remi@remirepo.net> | 2022-01-07 15:52:12 +0100 | 
|---|---|---|
| committer | Remi Collet <remi@php.net> | 2022-01-07 15:52:12 +0100 | 
| commit | 3f138dac9131271fbb1fc9c282ba866c1dbb1155 (patch) | |
| tree | 0d2d5686d7a2d9f79f1eb6936f5f8eb002a50d80 | |
| parent | b0f442787534dca5ad872793a4a52494516677d6 (diff) | |
update to 3.0.2
drop patches merged upstream
| -rw-r--r-- | PHPINFO | 4 | ||||
| -rw-r--r-- | REFLECTION | 15 | ||||
| -rw-r--r-- | memprof-php81.patch | 59 | ||||
| -rw-r--r-- | php-pecl-memprof.spec | 17 | 
4 files changed, 26 insertions, 69 deletions
| @@ -2,8 +2,8 @@  memprof  memprof support => enabled -memprof version => 3.0.1 -memprof native malloc support => Yes +memprof version => 3.0.2 +memprof native malloc support => No  Directive => Local Value => Master Value  memprof.output_dir => /tmp => /tmp @@ -1,4 +1,4 @@ -Extension [ <persistent> extension #121 memprof version 3.0.1 ] { +Extension [ <persistent> extension #119 memprof version 3.0.2 ] {    - INI {      Entry [ memprof.output_dir <ALL> ] @@ -11,38 +11,51 @@ Extension [ <persistent> extension #121 memprof version 3.0.1 ] {        - Parameters [0] {        } +      - Return [ bool ]      }      Function [ <internal:memprof> function memprof_enabled_flags ] {        - Parameters [0] {        } +      - Return [ array ]      }      Function [ <internal:memprof> function memprof_enable ] {        - Parameters [0] {        } +      - Return [ bool ]      }      Function [ <internal:memprof> function memprof_disable ] {        - Parameters [0] {        } +      - Return [ bool ]      }      Function [ <internal:memprof> function memprof_dump_array ] {        - Parameters [0] {        } +      - Return [ array ]      }      Function [ <internal:memprof> function memprof_dump_callgrind ] {        - Parameters [1] {          Parameter #0 [ <required> $handle ]        } +      - Return [ void ]      }      Function [ <internal:memprof> function memprof_dump_pprof ] {        - Parameters [1] {          Parameter #0 [ <required> $handle ]        } +      - Return [ void ] +    } +    Function [ <internal:memprof> function memprof_version ] { + +      - Parameters [0] { +      } +      - Return [ string ]      }    }  } diff --git a/memprof-php81.patch b/memprof-php81.patch deleted file mode 100644 index 46840ec..0000000 --- a/memprof-php81.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 9fde6cfe03c96d9f448484aa137901eca2d44d0c Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Fri, 2 Jul 2021 14:44:34 +0200 -Subject: [PATCH] fix build with 8.1.0alpha2 - ---- - memprof.c | 19 ++++++++++++------- - 1 file changed, 12 insertions(+), 7 deletions(-) - -diff --git a/memprof.c b/memprof.c -index a85b5bd..d754838 100644 ---- a/memprof.c -+++ b/memprof.c -@@ -196,15 +196,18 @@ static void (*old_zend_execute)(zend_execute_data *execute_data); - static void (*old_zend_execute_internal)(zend_execute_data *execute_data_ptr, zval *return_value); - #define zend_execute_fn zend_execute_ex -  --#if ZEND_MODULE_API_NO < 20170718 /* PHP 7.1 - 7.2 */ -+#if   PHP_VERSION_ID < 70200 /* PHP 7.1 */ - static void (*old_zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args); - #define MEMPROF_ZEND_ERROR_CB_ARGS_PASSTHRU type, error_filename, error_lineno, format, args --#elif ZEND_MODULE_API_NO < 20200930 /* PHP 7.3 - 7.4 */ -+#elif PHP_VERSION_ID < 80000 /* PHP 7.2 - 7.4 */ - static void (*old_zend_error_cb)(int type, const char *error_filename, const uint32_t error_lineno, const char *format, va_list args); - #define MEMPROF_ZEND_ERROR_CB_ARGS_PASSTHRU type, error_filename, error_lineno, format, args --#else /* PHP 8 */ -+#elif PHP_VERSION_ID < 80100 /* PHP 8.0 */ - static void (*old_zend_error_cb)(int type, const char *error_filename, const uint32_t error_lineno, zend_string *message); - #define MEMPROF_ZEND_ERROR_CB_ARGS_PASSTHRU type, error_filename, error_lineno, message -+#else                        /* PHP 8.1 */ -+static void (*old_zend_error_cb)(int type, zend_string *error_filename, const uint32_t error_lineno, zend_string *message); -+#define MEMPROF_ZEND_ERROR_CB_ARGS_PASSTHRU type, error_filename, error_lineno, message - #endif -  - static PHP_INI_MH((*origOnChangeMemoryLimit)) = NULL; -@@ -764,17 +767,19 @@ static char * generate_filename(const char * format) { - 	return filename; - } -  --#if ZEND_MODULE_API_NO < 20170718 /* PHP 7.1 - 7.2 */ -+#if   PHP_VERSION_ID < 70200 /* PHP 7.1 */ - static void memprof_zend_error_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args) --#elif ZEND_MODULE_API_NO < 20200930 /* PHP 7.3 - 7.4 */ -+#elif PHP_VERSION_ID < 80000 /* PHP 7.2 - 7.4 */ - static void memprof_zend_error_cb(int type, const char *error_filename, const uint32_t error_lineno, const char *format, va_list args) --#else /* PHP 8 */ -+#elif PHP_VERSION_ID < 80100 /* PHP 8.0 */ - static void memprof_zend_error_cb(int type, const char *error_filename, const uint32_t error_lineno, zend_string *message) -+#else                        /* PHP 8.1 */ -+static void memprof_zend_error_cb(int type, zend_string *error_filename, const uint32_t error_lineno, zend_string *message) - #endif - { - 	char * filename; - 	php_stream * stream; --#if ZEND_MODULE_API_NO < 20200930 -+#if PHP_VERSION_ID < 80000 - 	const char * msg = format; - #else - 	const char * msg = ZSTR_VAL(message); diff --git a/php-pecl-memprof.spec b/php-pecl-memprof.spec index e9ff2c6..46fe3fb 100644 --- a/php-pecl-memprof.spec +++ b/php-pecl-memprof.spec @@ -3,7 +3,7 @@  #  # Fedora spec file for php-pecl-memprof  # -# Copyright (c) 2013-2021 Remi Collet +# Copyright (c) 2013-2022 Remi Collet  # License: CC-BY-SA  # http://creativecommons.org/licenses/by-sa/4.0/  # @@ -33,14 +33,12 @@  Summary:        Memory usage profiler  Name:           %{?sub_prefix}php-pecl-%{pecl_name} -Version:        3.0.1 -Release:        2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Version:        3.0.2 +Release:        1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}  License:        BSD  URL:            https://pecl.php.net/package/%{pecl_name}  Source0:        https://pecl.php.net/get/%{pecl_name}-%{version}.tgz -Patch0:         %{pecl_name}-php81.patch -  BuildRequires:  make  BuildRequires:  %{?dtsprefix}gcc  BuildRequires:  %{?scl_prefix}php-devel >= 7.1 @@ -90,8 +88,6 @@ sed -e 's/role="test"/role="src"/' \      -i package.xml  cd NTS -%patch0 -p1 -b .pr54 -  # Sanity check, really often broken  extver=$(sed -n '/#define PHP_MEMPROF_VERSION/{s/.* "//;s/".*$//;p}' php_memprof.h)  if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then @@ -182,6 +178,9 @@ fi  %check +# Unusable +rm ?TS/tests/autodump-xdebug.phpt +  : Minimal load test for NTS extension  %{_bindir}/php --no-php-ini \      --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ @@ -232,6 +231,10 @@ REPORT_EXIT_STATUS=1 \  %changelog +* Fri Jan  7 2022 Remi Collet <remi@remirepo.net> - 3.0.2-1 +- update to 3.0.2 +- drop patches merged upstream +  * Wed Sep 01 2021 Remi Collet <remi@remirepo.net> - 3.0.1-2  - rebuild for 8.1.0RC1 | 
