Skip to content

Commit 8df5155

Browse files
committedAug 16, 2022
Remove unused 'to_language' and 'from_language' struct fields
1 parent aeccb13 commit 8df5155

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed
 

‎ext/mbstring/mb_gpc.c

+2-6
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,10 @@ MBSTRING_API SAPI_TREAT_DATA_FUNC(mbstr_treat_data)
132132

133133
info.data_type = arg;
134134
info.separator = separator;
135-
info.report_errors = 0;
135+
info.report_errors = false;
136136
info.to_encoding = MBSTRG(internal_encoding);
137-
info.to_language = MBSTRG(language);
138137
info.from_encodings = MBSTRG(http_input_list);
139138
info.num_from_encodings = MBSTRG(http_input_list_size);
140-
info.from_language = MBSTRG(language);
141139

142140
MBSTRG(illegalchars) = 0;
143141

@@ -318,12 +316,10 @@ SAPI_POST_HANDLER_FUNC(php_mb_post_handler)
318316

319317
info.data_type = PARSE_POST;
320318
info.separator = "&";
321-
info.report_errors = 0;
319+
info.report_errors = false;
322320
info.to_encoding = MBSTRG(internal_encoding);
323-
info.to_language = MBSTRG(language);
324321
info.from_encodings = MBSTRG(http_input_list);
325322
info.num_from_encodings = MBSTRG(http_input_list_size);
326-
info.from_language = MBSTRG(language);
327323

328324
php_stream_rewind(SG(request_info).request_body);
329325
post_data_str = php_stream_copy_to_mem(SG(request_info).request_body, PHP_STREAM_COPY_ALL, 0);

‎ext/mbstring/mb_gpc.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ typedef struct _php_mb_encoding_handler_info_t {
2626
const mbfl_encoding **from_encodings;
2727
size_t num_from_encodings;
2828
int data_type;
29-
unsigned int report_errors : 1;
30-
enum mbfl_no_language to_language;
31-
enum mbfl_no_language from_language;
29+
bool report_errors;
3230
} php_mb_encoding_handler_info_t;
3331

3432
/* }}}*/

‎ext/mbstring/mbstring.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -1531,12 +1531,10 @@ PHP_FUNCTION(mb_parse_str)
15311531

15321532
info.data_type = PARSE_STRING;
15331533
info.separator = PG(arg_separator).input;
1534-
info.report_errors = 1;
1534+
info.report_errors = true;
15351535
info.to_encoding = MBSTRG(current_internal_encoding);
1536-
info.to_language = MBSTRG(language);
15371536
info.from_encodings = MBSTRG(http_input_list);
15381537
info.num_from_encodings = MBSTRG(http_input_list_size);
1539-
info.from_language = MBSTRG(language);
15401538

15411539
detected = _php_mb_encoding_handler_ex(&info, track_vars_array, encstr);
15421540

0 commit comments

Comments
 (0)