diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2020-12-13 11:52:29 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2021-08-08 09:00:24 +0200 |
commit | 2b12b4077a4c463e27d7e0a3d1d11350fc85f82c (patch) | |
tree | 939694602085dc826b11f755011eb442328f854e /src/plugins/php | |
parent | 61c31690685bad82be0a73eab8f93980c3efb8fb (diff) | |
download | weechat-2b12b4077a4c463e27d7e0a3d1d11350fc85f82c.zip |
php: add detection of PHP 8.0, fix compilation errors
Diffstat (limited to 'src/plugins/php')
-rw-r--r-- | src/plugins/php/weechat-php-api.c | 2 | ||||
-rw-r--r-- | src/plugins/php/weechat-php.c | 14 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/plugins/php/weechat-php-api.c b/src/plugins/php/weechat-php-api.c index 5e3bcaaa3..76644ef1d 100644 --- a/src/plugins/php/weechat-php-api.c +++ b/src/plugins/php/weechat-php-api.c @@ -119,7 +119,7 @@ API_FUNC(register) php_registered_script->name); API_RETURN_ERROR; } - if (zend_parse_parameters (ZEND_NUM_ARGS() TSRMLS_CC, "SSSSSzS", + if (zend_parse_parameters (ZEND_NUM_ARGS(), "SSSSSzS", &name, &author, &version, &license, &description, &shutdown_func, &charset) == FAILURE) { diff --git a/src/plugins/php/weechat-php.c b/src/plugins/php/weechat-php.c index 484573c9d..ef1caa2a2 100644 --- a/src/plugins/php/weechat-php.c +++ b/src/plugins/php/weechat-php.c @@ -1246,8 +1246,18 @@ php_weechat_sapi_error (int type, const char *format, ...) } } -#if PHP_VERSION_ID >= 70100 -/* PHP >= 7.1 */ +#if PHP_VERSION_ID >= 80000 +/* PHP >= 8.0 */ +void +php_weechat_log_message (const char *message, int syslog_type_int) +{ + /* make C compiler happy */ + (void) syslog_type_int; + + php_weechat_ub_write (message, strlen (message)); +} +#elif PHP_VERSION_ID >= 70100 +/* 7.1 <= PHP < 8.0 */ void php_weechat_log_message (char *message, int syslog_type_int) { |