summaryrefslogtreecommitdiffstats
path: root/4.patch
blob: 0c9f1f9e1f2dbb44dd1766b44976424b74c64408 (plain)
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
From e9ad43262a6b036bf2f81013f23783eec619a537 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Wed, 30 Jul 2025 14:02:25 +0200
Subject: [PATCH] use Zend/zend_smart_string.h

---
 phpc.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/phpc.h b/phpc.h
index 93d5cca..075bbad 100644
--- a/phpc.h
+++ b/phpc.h
@@ -266,7 +266,11 @@ typedef int phpc_str_size_t;
 
 /* Smart string */
 #if defined(PHPC_SMART_STR_INCLUDE) || defined(PHPC_SMART_CSTR_INCLUDE)
+#if PHP_VERSION_ID < 70200
 #include "ext/standard/php_smart_str.h"
+#else
+#include "Zend/zend_smart_str.h"
+#endif
 
 #ifdef PHPC_SMART_CSTR_INCLUDE
 /* smart_str for C string has been renamed in PHP 7 so we have to wrap it */
@@ -929,7 +933,11 @@ typedef size_t    phpc_str_size_t;
 #endif /* PHPC_SMART_STR_INCLUDE */
 
 #ifdef PHPC_SMART_CSTR_INCLUDE
+#if PHP_VERSION_ID < 70200
 #include "ext/standard/php_smart_string.h"
+#else
+#include "Zend/zend_smart_string.h"
+#endif
 /* smart_str for C string has been renamed in PHP 7 so we have to wrap it */
 #define phpc_smart_cstr                 smart_string
 #define phpc_smart_cstr_alloc           smart_string_alloc