summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemi Collet2018-09-03 15:55:55 +0200
committerjvoisin2018-09-03 13:55:55 +0000
commit19aa522813b9a8494c4bf0c6937f84e379daaebe (patch)
tree0b83011fd9c9b0b8e5993641b75eebfd6178fb82
parent499a81914597f156fe9a67e47e3baf82a0af4bde (diff)
Add a const attribute, added in 7.3
-rw-r--r--src/sp_session.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sp_session.c b/src/sp_session.c
index 8aad624..0f1c0b8 100644
--- a/src/sp_session.c
+++ b/src/sp_session.c
@@ -15,7 +15,11 @@ static php_ps_globals *session_globals = NULL;
15#endif 15#endif
16 16
17static ps_module *s_module; 17static ps_module *s_module;
18#if PHP_VERSION_ID < 70300
18static ps_module *s_original_mod; 19static ps_module *s_original_mod;
20#else
21static const ps_module *s_original_mod;
22#endif
19static int (*old_s_read)(PS_READ_ARGS); 23static int (*old_s_read)(PS_READ_ARGS);
20static int (*old_s_write)(PS_WRITE_ARGS); 24static int (*old_s_write)(PS_WRITE_ARGS);
21static int (*previous_sessionRINIT)(INIT_FUNC_ARGS) = NULL; 25static int (*previous_sessionRINIT)(INIT_FUNC_ARGS) = NULL;
@@ -56,7 +60,11 @@ static int sp_hook_s_write(PS_WRITE_ARGS) {
56} 60}
57 61
58static void sp_hook_session_module() { 62static void sp_hook_session_module() {
63#if PHP_VERSION_ID < 70300
59 ps_module *old_mod = SESSION_G(mod); 64 ps_module *old_mod = SESSION_G(mod);
65#else
66 const ps_module *old_mod = SESSION_G(mod);
67#endif
60 ps_module *mod; 68 ps_module *mod;
61 69
62 if (old_mod == NULL || s_module == old_mod) { 70 if (old_mod == NULL || s_module == old_mod) {