mirror of
https://github.com/python/cpython.git
synced 2025-07-27 05:04:15 +00:00
Make _kind types global for C++ compilation.
Explicitly cast void* to int to cmpop_ty.
This commit is contained in:
parent
9b26122ec0
commit
01b810106c
3 changed files with 26 additions and 20 deletions
|
@ -2505,7 +2505,7 @@ ast2obj_expr(void* _o)
|
|||
value = PyList_New(n);
|
||||
if (!value) goto failed;
|
||||
for(i = 0; i < n; i++)
|
||||
PyList_SET_ITEM(value, i, ast2obj_cmpop((cmpop_ty)asdl_seq_GET(o->v.Compare.ops, i)));
|
||||
PyList_SET_ITEM(value, i, ast2obj_cmpop((cmpop_ty)(int)asdl_seq_GET(o->v.Compare.ops, i)));
|
||||
}
|
||||
if (!value) goto failed;
|
||||
if (PyObject_SetAttrString(result, "ops", value) == -1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue