mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
bpo-41204: Fix compiler warning in ast_type_init() (GH-21307)
This commit is contained in:
parent
b40e434386
commit
1f76453173
2 changed files with 10 additions and 8 deletions
|
@ -688,13 +688,14 @@ ast_clear(AST_object *self)
|
|||
static int
|
||||
ast_type_init(PyObject *self, PyObject *args, PyObject *kw)
|
||||
{
|
||||
astmodulestate *state = get_global_ast_state();
|
||||
if (state == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
Py_ssize_t i, numfields = 0;
|
||||
int res = -1;
|
||||
PyObject *key, *value, *fields;
|
||||
astmodulestate *state = get_global_ast_state();
|
||||
if (state == NULL) {
|
||||
goto cleanup;
|
||||
}
|
||||
if (_PyObject_LookupAttr((PyObject*)Py_TYPE(self), state->_fields, &fields) < 0) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue