| 1 | Patch-Source: https://github.com/krakjoe/pcov/pull/133
|
| 2 | PHP 8.6 removed the INI_STR()/INI_INT()/INI_BOOL() macros and made
|
| 3 | zend_ini_string() return const char*; provide compatible replacements.
|
| 4 | |
| 5 | |
| 6 | @@ -39,6 +39,14 @@
|
| 7 |
|
| 8 | #include "php_pcov.h"
|
| 9 |
|
| 10 | +/* PHP 8.6 removed the INI_STR()/INI_INT()/INI_BOOL() accessor macros and
|
| 11 | + * zend_ini_string() now returns const char*. Restore them for this build. */
|
| 12 | +#if PHP_VERSION_ID >= 80600
|
| 13 | +# define INI_STR(name) ((char*) zend_ini_string((name), strlen(name), 0))
|
| 14 | +# define INI_INT(name) ((zend_long) zend_ini_long((name), strlen(name), 0))
|
| 15 | +# define INI_BOOL(name) ((bool) zend_ini_long((name), strlen(name), 0))
|
| 16 | +#endif
|
| 17 | +
|
| 18 | #define PCOV_FILTER_ALL 0
|
| 19 | #define PCOV_FILTER_INCLUDE 1
|
| 20 | #define PCOV_FILTER_EXCLUDE 2
|