mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
Use ZEND_HASH_FILL_* API.
This commit is contained in:
parent
ace8fba759
commit
2e8904fee0
@ -307,10 +307,16 @@ static void add_token(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (token_type >= 256) {
|
} else if (token_type >= 256) {
|
||||||
array_init(&token);
|
array_init_size(&token, 3);
|
||||||
add_next_index_long(&token, token_type);
|
zend_hash_real_init_packed(Z_ARRVAL(token));
|
||||||
add_next_index_str(&token, make_str(text, leng, interned_strings));
|
ZEND_HASH_FILL_PACKED(Z_ARRVAL(token)) {
|
||||||
add_next_index_long(&token, lineno);
|
ZEND_HASH_FILL_SET_LONG(token_type);
|
||||||
|
ZEND_HASH_FILL_NEXT();
|
||||||
|
ZEND_HASH_FILL_SET_STR(make_str(text, leng, interned_strings));
|
||||||
|
ZEND_HASH_FILL_NEXT();
|
||||||
|
ZEND_HASH_FILL_SET_LONG(lineno);
|
||||||
|
ZEND_HASH_FILL_NEXT();
|
||||||
|
} ZEND_HASH_FILL_END();
|
||||||
} else {
|
} else {
|
||||||
ZVAL_STR(&token, make_str(text, leng, interned_strings));
|
ZVAL_STR(&token, make_str(text, leng, interned_strings));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user