summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-04-15 10:45:18 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-04-15 11:01:12 +0200
commite15409b43cacf711608189c299191f2969ea331c (patch)
treeec973dac1e4cf73a10d50ca1b901b2db776d4e21
parent7643cf19966fd84c3f122f4887034d0170a04920 (diff)
downloadphp-git-e15409b43cacf711608189c299191f2969ea331c.tar.gz
Adjust zend_write_func signature
Make it return size_t instead of int, to line up with actual implementation.
-rw-r--r--Zend/zend.c2
-rw-r--r--Zend/zend.h2
-rw-r--r--ext/ffi/tests/200.phpt2
3 files changed, 3 insertions, 3 deletions
diff --git a/Zend/zend.c b/Zend/zend.c
index d4c2e7c25c..555483a7be 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -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;
diff --git a/Zend/zend.h b/Zend/zend.h
index fd1fee9099..cd41cde5ef 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -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__)
diff --git a/ext/ffi/tests/200.phpt b/ext/ffi/tests/200.phpt
index e80d1ed08c..39dcbdf71a 100644
--- a/ext/ffi/tests/200.phpt
+++ b/ext/ffi/tests/200.phpt
@@ -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());