Adjust zend_write_func signature

Make it return size_t instead of int, to line up with actual
implementation.
This commit is contained in:
Nikita Popov 2020-04-15 10:45:18 +02:00
parent 7643cf1996
commit e15409b43c
3 changed files with 3 additions and 3 deletions

View File

@ -820,7 +820,7 @@ int zend_startup(zend_utility_functions *utility_functions) /* {{{ */
/* Set up utility functions and values */
zend_error_cb = utility_functions->error_function;
zend_printf = utility_functions->printf_function;
zend_write = (zend_write_func_t) utility_functions->write_function;
zend_write = utility_functions->write_function;
zend_fopen = utility_functions->fopen_function;
if (!zend_fopen) {
zend_fopen = zend_fopen_wrapper;

View File

@ -205,7 +205,7 @@ typedef struct _zend_utility_values {
zend_bool html_errors;
} zend_utility_values;
typedef int (*zend_write_func_t)(const char *str, size_t str_length);
typedef size_t (*zend_write_func_t)(const char *str, size_t str_length);
#define zend_bailout() _zend_bailout(__FILE__, __LINE__)

View File

@ -17,7 +17,7 @@ opcache.jit=0
<?php
require_once('utils.inc');
$zend = FFI::cdef("
typedef int (*zend_write_func_t)(const char *str, size_t str_length);
typedef size_t (*zend_write_func_t)(const char *str, size_t str_length);
extern zend_write_func_t zend_write;
", ffi_get_php_dll_name());