1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
From ebc51a7314881805f9b8fda2ac19285465f48d3e Mon Sep 17 00:00:00 2001
From: Andy Postnikov <apostnikov@gmail.com>
Date: Sat, 11 Jul 2020 19:43:18 +0300
Subject: [PATCH] Fix build on PHP 8 alpha 2
call_user_function_ex() no longer defined
---
emit.c | 4 ++--
parse.c | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/emit.c b/emit.c
index 234a64e..cc5134b 100644
--- a/emit.c
+++ b/emit.c
@@ -722,8 +722,8 @@ y_write_object_callback (
zend_string *str_key;
/* call the user function */
- if (FAILURE == call_user_function_ex(EG(function_table), NULL,
- callback, &zret, 1, argv, 0, NULL) ||
+ if (FAILURE == call_user_function(EG(function_table), NULL,
+ callback, &zret, 1, argv) ||
Z_TYPE_P(&zret) == IS_UNDEF) {
php_error_docref(NULL, E_WARNING,
"Failed to apply callback for class '%s'"
diff --git a/parse.c b/parse.c
index 71eb4f2..2405c58 100644
--- a/parse.c
+++ b/parse.c
@@ -643,7 +643,7 @@ apply_filter(zval *zp, yaml_event_t event, HashTable *callbacks)
ZVAL_LONG(&callback_args[2], 0);
/* call the user function */
- callback_result = call_user_function_ex(EG(function_table), NULL, callback, &retval, 3, callback_args, 0, NULL);
+ callback_result = call_user_function(EG(function_table), NULL, callback, &retval, 3, callback_args);
/* cleanup our temp variables */
zval_ptr_dtor(&callback_args[1]);
@@ -846,7 +846,7 @@ void eval_scalar_with_callbacks(yaml_event_t event,
ZVAL_STRINGL(&argv[1], tag, strlen(tag));
ZVAL_LONG(&argv[2], event.data.scalar.style);
- if (FAILURE == call_user_function_ex(EG(function_table), NULL, callback, retval, 3, argv, 0, NULL) || Z_TYPE_P(retval) == IS_UNDEF) {
+ if (FAILURE == call_user_function(EG(function_table), NULL, callback, retval, 3, argv) || Z_TYPE_P(retval) == IS_UNDEF) {
php_error_docref(NULL, E_WARNING,
"Failed to evaluate value for tag '%s'"
" with user defined function", tag);
@@ -898,8 +898,8 @@ eval_timestamp(zval **zpp, const char *ts, size_t ts_len)
ZVAL_STRINGL(&arg, ts, ts_len);
argv[0] = arg;
- if (FAILURE == call_user_function_ex(EG(function_table), NULL, func,
- &retval, 1, argv, 0, NULL) || Z_TYPE_P(&retval) == IS_UNDEF) {
+ if (FAILURE == call_user_function(EG(function_table), NULL, func,
+ &retval, 1, argv) || Z_TYPE_P(&retval) == IS_UNDEF) {
php_error_docref(NULL, E_WARNING,
"Failed to evaluate string '%s' as timestamp", ts);
if (func != NULL) {
|