1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

ext/session: get rid of sname_len field

This is unnecessary now that the session name is a zend_string
This commit is contained in:
Gina Peter Banyard
2025-07-06 04:08:15 +01:00
parent c3dac0f8b6
commit 36358bad84
2 changed files with 1 additions and 3 deletions

View File

@@ -120,7 +120,6 @@ typedef enum {
} php_session_status;
typedef struct _php_session_rfc1867_progress {
size_t sname_len;
zval sid;
smart_str key;

View File

@@ -3013,7 +3013,7 @@ static bool early_find_sid_in(zval *dest, int where, php_session_rfc1867_progres
return 0;
}
if ((ppid = zend_hash_str_find(Z_ARRVAL(PG(http_globals)[where]), ZSTR_VAL(PS(session_name)), progress->sname_len))
if ((ppid = zend_hash_find(Z_ARRVAL(PG(http_globals)[where]), PS(session_name)))
&& Z_TYPE_P(ppid) == IS_STRING) {
zval_ptr_dtor(dest);
ZVAL_COPY_DEREF(dest, ppid);
@@ -3121,7 +3121,6 @@ static zend_result php_session_rfc1867_callback(unsigned int event, void *event_
multipart_event_start *data = (multipart_event_start *) event_data;
progress = ecalloc(1, sizeof(php_session_rfc1867_progress));
progress->content_length = data->content_length;
progress->sname_len = ZSTR_LEN(PS(session_name));
PS(rfc1867_progress) = progress;
}
break;