diff options
author | Remi Collet <remi@remirepo.net> | 2020-11-19 10:45:56 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2020-11-19 10:45:56 +0100 |
commit | 3ded1aac8651e5e9bbed3496434f805163db5e40 (patch) | |
tree | 74fb19533feaf776da4150e1d7761bb7565c440e /294.patch | |
parent | e2dd3d55a95ec6b0b63ce9b56bc95f4ea1229ff3 (diff) |
update to 4.1.1
drop patch merged upstream
Diffstat (limited to '294.patch')
-rw-r--r-- | 294.patch | 109 |
1 files changed, 0 insertions, 109 deletions
diff --git a/294.patch b/294.patch deleted file mode 100644 index ba47917..0000000 --- a/294.patch +++ /dev/null @@ -1,109 +0,0 @@ -From 4f50ecec5a1cfda6689c41fd0691526cf74cdde7 Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Fri, 13 Nov 2020 08:49:03 +0100 -Subject: [PATCH] fix for PHP 8 - ---- - skywalking.cc | 7 +++++-- - src/sky_plugin_hyperf_guzzle.cc | 16 ++++++++++++++-- - src/sky_plugin_redis.cc | 8 ++++---- - 3 files changed, 23 insertions(+), 8 deletions(-) - -diff --git a/skywalking.cc b/skywalking.cc -index 31eda51..e27808f 100644 ---- a/skywalking.cc -+++ b/skywalking.cc -@@ -190,8 +190,11 @@ zend_module_dep skywalking_deps[] = { - ZEND_MOD_END - }; - -+ZEND_BEGIN_ARG_INFO_EX(arginfo_skywalking_trace_id, 0, 0, 0) -+ZEND_END_ARG_INFO() -+ - const zend_function_entry skywalking_functions[] = { -- PHP_FE (skywalking_trace_id, NULL) -+ PHP_FE (skywalking_trace_id, arginfo_skywalking_trace_id) - PHP_FE_END - }; - -@@ -215,4 +218,4 @@ zend_module_entry skywalking_module_entry = { - ZEND_TSRMLS_CACHE_DEFINE() - #endif - ZEND_GET_MODULE(skywalking) --#endif -\ No newline at end of file -+#endif -diff --git a/src/sky_plugin_hyperf_guzzle.cc b/src/sky_plugin_hyperf_guzzle.cc -index ad851e0..68ded0a 100644 ---- a/src/sky_plugin_hyperf_guzzle.cc -+++ b/src/sky_plugin_hyperf_guzzle.cc -@@ -29,18 +29,30 @@ Span *sky_plugin_hyperf_guzzle(zend_execute_data *execute_data, const std::strin - if (arg_count >= 1) { - zval *request = ZEND_CALL_ARG(execute_data, 1); - zval uri; -+#if PHP_VERSION_ID < 80000 - zend_call_method(request, Z_OBJCE_P(request), nullptr, ZEND_STRL("geturi"), &uri, 0, nullptr, nullptr); -+#else -+ zend_call_method(Z_OBJ_P(request), Z_OBJCE_P(request), nullptr, ZEND_STRL("geturi"), &uri, 0, nullptr, nullptr); -+#endif - - if (!Z_ISUNDEF(uri)) { - zval scheme, host, port, path, query, to_string; - int _port = 80; -+#if PHP_VERSION_ID < 80000 - zend_call_method(&uri, Z_OBJCE_P(&uri), nullptr, ZEND_STRL("getscheme"), &scheme, 0, nullptr, nullptr); - zend_call_method(&uri, Z_OBJCE_P(&uri), nullptr, ZEND_STRL("gethost"), &host, 0, nullptr, nullptr); - zend_call_method(&uri, Z_OBJCE_P(&uri), nullptr, ZEND_STRL("getport"), &port, 0, nullptr, nullptr); - zend_call_method(&uri, Z_OBJCE_P(&uri), nullptr, ZEND_STRL("getpath"), &path, 0, nullptr, nullptr); - zend_call_method(&uri, Z_OBJCE_P(&uri), nullptr, ZEND_STRL("getquery"), &query, 0, nullptr, nullptr); - zend_call_method(&uri, Z_OBJCE_P(&uri), nullptr, ZEND_STRL("__tostring"), &to_string, 0, nullptr, nullptr); -- -+#else -+ zend_call_method(Z_OBJ(uri), Z_OBJCE(uri), nullptr, ZEND_STRL("getscheme"), &scheme, 0, nullptr, nullptr); -+ zend_call_method(Z_OBJ(uri), Z_OBJCE(uri), nullptr, ZEND_STRL("gethost"), &host, 0, nullptr, nullptr); -+ zend_call_method(Z_OBJ(uri), Z_OBJCE(uri), nullptr, ZEND_STRL("getport"), &port, 0, nullptr, nullptr); -+ zend_call_method(Z_OBJ(uri), Z_OBJCE(uri), nullptr, ZEND_STRL("getpath"), &path, 0, nullptr, nullptr); -+ zend_call_method(Z_OBJ(uri), Z_OBJCE(uri), nullptr, ZEND_STRL("getquery"), &query, 0, nullptr, nullptr); -+ zend_call_method(Z_OBJ(uri), Z_OBJCE(uri), nullptr, ZEND_STRL("__tostring"), &to_string, 0, nullptr, nullptr); -+#endif - if (!Z_ISUNDEF(scheme) && Z_TYPE(scheme) == IS_STRING) { - - if (strcmp(Z_STRVAL(scheme), "http") == 0 || strcmp(Z_STRVAL(scheme), "https") == 0) { -@@ -74,4 +86,4 @@ Span *sky_plugin_hyperf_guzzle(zend_execute_data *execute_data, const std::strin - } - - return nullptr; --} -\ No newline at end of file -+} -diff --git a/src/sky_plugin_redis.cc b/src/sky_plugin_redis.cc -index 450e5d7..003b517 100644 ---- a/src/sky_plugin_redis.cc -+++ b/src/sky_plugin_redis.cc -@@ -80,8 +80,8 @@ std::string sky_plugin_redis_peer(zend_execute_data *execute_data) { - zend_call_method(command, Z_OBJCE_P(command), nullptr, ZEND_STRL("gethost"), &host, 0, nullptr, nullptr); - zend_call_method(command, Z_OBJCE_P(command), nullptr, ZEND_STRL("getport"), &port, 0, nullptr, nullptr); - #else -- zend_call_method(Z_OBJCE_P(command), Z_OBJCE_P(command), nullptr, ZEND_STRL("gethost"), &host, 0, nullptr, nullptr); -- zend_call_method(Z_OBJCE_P(command), Z_OBJCE_P(command), nullptr, ZEND_STRL("getport"), &port, 0, nullptr, nullptr); -+ zend_call_method(Z_OBJ_P(command), Z_OBJCE_P(command), nullptr, ZEND_STRL("gethost"), &host, 0, nullptr, nullptr); -+ zend_call_method(Z_OBJ_P(command), Z_OBJCE_P(command), nullptr, ZEND_STRL("getport"), &port, 0, nullptr, nullptr); - #endif - - if (!Z_ISUNDEF(host) && !Z_ISUNDEF(port) && Z_TYPE(host) == IS_STRING) { -@@ -136,7 +136,7 @@ std::string sky_plugin_redis_bit_count_cmd(zend_execute_data *execute_data, std: - uint32_t arg_count = ZEND_CALL_NUM_ARGS(execute_data); - - if (arg_count >= 1) { -- for (int i = 1; i <= 3; ++i) { -+ for (uint32_t i = 1; i <= 3; ++i) { - if (i <= arg_count) { - zval *value = ZEND_CALL_ARG(execute_data, i); - if (Z_TYPE_P(value) == IS_LONG) { -@@ -154,4 +154,4 @@ std::string sky_plugin_redis_bit_count_cmd(zend_execute_data *execute_data, std: - return cmd; - } - return ""; --} -\ No newline at end of file -+} |