Skip to content

Commit af789af

Browse files
committed
Fix type incompatibility in assignment.
This partially reverts 0956267, which introduced a type incompatibility where an `int` function is assigned to a `zend_result` function. That yields a level 1 C4133 warning on MSVC, and usually (e.g. in CI) level 1 warnings are elevated to errors, so the build fails.[1] The PHP-8.3 branch and up are uneffected by this, so the upward merges should be empty. [1] <php@0956267#r144587696>
1 parent 5fbda73 commit af789af

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ext/session/session.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@
5656

5757
PHPAPI ZEND_DECLARE_MODULE_GLOBALS(ps)
5858

59-
static zend_result php_session_rfc1867_callback(unsigned int event, void *event_data, void **extra);
60-
static zend_result (*php_session_rfc1867_orig_callback)(unsigned int event, void *event_data, void **extra);
59+
static int php_session_rfc1867_callback(unsigned int event, void *event_data, void **extra);
60+
/* the following signature must match (*php_rfc1867_callback) in main/rfc1867.h */
61+
static int (*php_session_rfc1867_orig_callback)(unsigned int event, void *event_data, void **extra);
6162
static void php_session_track_init(void);
6263

6364
/* SessionHandler class */

0 commit comments

Comments
 (0)