From 19aa522813b9a8494c4bf0c6937f84e379daaebe Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 3 Sep 2018 15:55:55 +0200 Subject: Add a const attribute, added in 7.3 --- src/sp_session.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') 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; #endif static ps_module *s_module; +#if PHP_VERSION_ID < 70300 static ps_module *s_original_mod; +#else +static const ps_module *s_original_mod; +#endif static int (*old_s_read)(PS_READ_ARGS); static int (*old_s_write)(PS_WRITE_ARGS); static int (*previous_sessionRINIT)(INIT_FUNC_ARGS) = NULL; @@ -56,7 +60,11 @@ static int sp_hook_s_write(PS_WRITE_ARGS) { } static void sp_hook_session_module() { +#if PHP_VERSION_ID < 70300 ps_module *old_mod = SESSION_G(mod); +#else + const ps_module *old_mod = SESSION_G(mod); +#endif ps_module *mod; if (old_mod == NULL || s_module == old_mod) { -- cgit v1.3