We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 850601a commit 0e14a6dCopy full SHA for 0e14a6d
Python/codegen.c
@@ -13,6 +13,7 @@
13
*/
14
15
#include "Python.h"
16
+#include "listobject.h"
17
#include "opcode.h"
18
#include "pycore_ast.h" // _PyAST_GetDocString()
19
#define NEED_OPCODE_TABLES
@@ -825,9 +826,7 @@ codegen_process_deferred_annotations(compiler *c, location loc)
825
826
void *key = (void *)((uintptr_t)ste->ste_id + 1);
827
828
// Get the first annotation location
- if (PyList_GET_SIZE(deferred_anno) == 0) {
829
- goto error;
830
- }
+ assert(PyList_GET_SIZE(deferred_anno) > 0);
831
PyObject* ptr = PyList_GET_ITEM(deferred_anno, 0);
832
stmt_ty st = (stmt_ty)PyLong_AsVoidPtr(ptr);
833
if (st == NULL) {
0 commit comments