Skip to content

Commit f656530

Browse files
committed
ext/session: get rid of sname_len field
This is unnecessary now that the session name is a zend_string
1 parent d13ef59 commit f656530

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

ext/session/php_session.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ typedef enum {
120120
} php_session_status;
121121

122122
typedef struct _php_session_rfc1867_progress {
123-
size_t sname_len;
124123
zval sid;
125124
smart_str key;
126125

ext/session/session.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3013,7 +3013,7 @@ static bool early_find_sid_in(zval *dest, int where, php_session_rfc1867_progres
30133013
return 0;
30143014
}
30153015

3016-
if ((ppid = zend_hash_str_find(Z_ARRVAL(PG(http_globals)[where]), ZSTR_VAL(PS(session_name)), progress->sname_len))
3016+
if ((ppid = zend_hash_find(Z_ARRVAL(PG(http_globals)[where]), PS(session_name)))
30173017
&& Z_TYPE_P(ppid) == IS_STRING) {
30183018
zval_ptr_dtor(dest);
30193019
ZVAL_COPY_DEREF(dest, ppid);
@@ -3121,7 +3121,6 @@ static zend_result php_session_rfc1867_callback(unsigned int event, void *event_
31213121
multipart_event_start *data = (multipart_event_start *) event_data;
31223122
progress = ecalloc(1, sizeof(php_session_rfc1867_progress));
31233123
progress->content_length = data->content_length;
3124-
progress->sname_len = ZSTR_LEN(PS(session_name));
31253124
PS(rfc1867_progress) = progress;
31263125
}
31273126
break;

0 commit comments

Comments
 (0)