summaryrefslogtreecommitdiffstats
path: root/stomp-upstream.patch
blob: d53e166a48ec4c8ab7e1de8c3a961df00581e102 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
From 2a6ef9570e309b6d2d58f03ed80e305d7b2ea4cb Mon Sep 17 00:00:00 2001
From: Pierrick Charron <pierrick@webstart.fr>
Date: Thu, 9 Jun 2016 13:27:54 -0400
Subject: [PATCH] Remove useless zend_fcall_info.function_table

---
 php_stomp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/php_stomp.c b/php_stomp.c
index 96a08db..869e7ed 100644
--- a/php_stomp.c
+++ b/php_stomp.c
@@ -963,8 +963,10 @@ PHP_FUNCTION(stomp_read_frame)
 				}
 
 				fci.size = sizeof(fci);
+#if (PHP_MAJOR_VERSION == 7 && PHP_MINOR_VERSION == 0)
 				fci.function_table = &ce->function_table;
 				fci.symbol_table = NULL;
+#endif
 
 				/* PARAMS */
 				fci.param_count = 3;
-- 
2.1.4

From bd384b27c1ed0b188dd7fd21961d1f31628939cd Mon Sep 17 00:00:00 2001
From: Pierrick Charron <pierrick@webstart.fr>
Date: Thu, 9 Jun 2016 13:32:55 -0400
Subject: [PATCH] get rid of EG(scope). zend_get_executed_scope() should be
 used instead

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

diff --git a/php_stomp.c b/php_stomp.c
index 869e7ed..dcde51f 100644
--- a/php_stomp.c
+++ b/php_stomp.c
@@ -982,7 +982,11 @@ PHP_FUNCTION(stomp_read_frame)
 
 				fcc.initialized = 1;
 				fcc.function_handler = ce->constructor;
+#if (PHP_MAJOR_VERSION == 7 && PHP_MINOR_VERSION == 0)
 				fcc.calling_scope = EG(scope);
+#else
+				fcc.calling_scope = zend_get_executed_scope();
+#endif
 				fcc.object = Z_OBJ_P(return_value);
 
 				if (zend_call_function(&fci, &fcc ) == FAILURE) {
-- 
2.1.4