Skip to content

Commit c9aa720

Browse files
committed
Use ZSTR_CHAR
1 parent 92e1f89 commit c9aa720

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

Zend/zend_string.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -551,9 +551,6 @@ EMPTY_SWITCH_DEFAULT_CASE()
551551
_(ZEND_STR_FALSE, "false") \
552552
_(ZEND_STR_NULL_LOWERCASE, "null") \
553553
_(ZEND_STR_MIXED, "mixed") \
554-
_(ZEND_STR_0, "0") \
555-
_(ZEND_STR_1, "1") \
556-
_(ZEND_STR_QUESTION_MARK, "?") \
557554

558555

559556
typedef enum _zend_known_string_id {

ext/pdo/pdo_sql_parser.re

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ PDO_API int pdo_parse_params(pdo_stmt_t *stmt, zend_string *inquery, zend_string
122122

123123
if (t == PDO_PARSER_ESCAPED_QUESTION) {
124124
plc->bindno = PDO_PARSER_BINDNO_ESCAPED_CHAR;
125-
plc->quoted = ZSTR_KNOWN(ZEND_STR_QUESTION_MARK);
125+
plc->quoted = ZSTR_CHAR('?');
126126
plc->freeq = 0;
127127
escapes++;
128128
} else {
@@ -263,7 +263,7 @@ safe:
263263

264264
switch (param_type) {
265265
case PDO_PARAM_BOOL:
266-
plc->quoted = zend_is_true(parameter) ? ZSTR_KNOWN(ZEND_STR_1) : ZSTR_KNOWN(ZEND_STR_0);
266+
plc->quoted = zend_is_true(parameter) ? ZSTR_CHAR('1') : ZSTR_CHAR('0');
267267
plc->freeq = 0;
268268
break;
269269

@@ -418,7 +418,7 @@ rewrite:
418418
name = estrndup(plc->pos, plc->len);
419419
zend_hash_index_update_mem(stmt->bound_param_map, plc->bindno, name, plc->len + 1);
420420
efree(name);
421-
plc->quoted = ZSTR_KNOWN(ZEND_STR_QUESTION_MARK);
421+
plc->quoted = ZSTR_CHAR('?');
422422
newbuffer_len -= plc->len - 1;
423423
}
424424

0 commit comments

Comments
 (0)