зеркало из https://github.com/github/ruby.git
[PRISM] Use xcalloc for constants instead of calloc
This commit is contained in:
Родитель
5299672a5b
Коммит
ec6f40e8f1
|
@ -10289,7 +10289,7 @@ pm_parse_process(pm_parse_result_t *result, pm_node_t *node)
|
|||
// Now set up the constant pool and intern all of the various constants into
|
||||
// their corresponding IDs.
|
||||
scope_node->parser = parser;
|
||||
scope_node->constants = calloc(parser->constant_pool.size, sizeof(ID));
|
||||
scope_node->constants = xcalloc(parser->constant_pool.size, sizeof(ID));
|
||||
|
||||
for (uint32_t index = 0; index < parser->constant_pool.size; index++) {
|
||||
pm_constant_t *constant = &parser->constant_pool.constants[index];
|
||||
|
|
Загрузка…
Ссылка в новой задаче