summaryrefslogtreecommitdiffstats
path: root/31.patch
blob: b9e4f72dc176b9607a018edb73627cd2aca38c50 (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
From f08ca66aa96c75658ba1eb1e8918189f925553c1 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Sun, 25 Jun 2017 07:28:55 +0200
Subject: [PATCH] IS_TYPE_IMMUTABLE is dropped in 7.2

---
 yaconf.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/yaconf.c b/yaconf.c
index 8faa0b6..55b6731 100644
--- a/yaconf.c
+++ b/yaconf.c
@@ -92,7 +92,11 @@ static void php_yaconf_hash_init(zval *zv, size_t size) /* {{{ */ {
 	GC_FLAGS(ht) |= IS_ARRAY_IMMUTABLE;
 	GC_REFCOUNT(ht) = 2;
 	ZVAL_ARR(zv, ht);
+#if PHP_VERSION_ID < 70200
 	Z_TYPE_FLAGS_P(zv) = IS_TYPE_IMMUTABLE;
+#else
+	Z_TYPE_FLAGS_P(zv) = IS_TYPE_COPYABLE;
+#endif
 } 
 /* }}} */