[Python-checkins] Complete switch cases in symtable.c; fixes bpo-35963 (GH-11821)

Guido van Rossum webhook-mailer at python.org
Mon Feb 11 14:34:56 EST 2019


https://github.com/python/cpython/commit/522346d792d9013140a3f4ad3534ac10f38d9085
commit: 522346d792d9013140a3f4ad3534ac10f38d9085
branch: master
author: Guido van Rossum <guido at python.org>
committer: GitHub <noreply at github.com>
date: 2019-02-11T11:34:50-08:00
summary:

Complete switch cases in symtable.c; fixes bpo-35963 (GH-11821)

files:
M Python/symtable.c

diff --git a/Python/symtable.c b/Python/symtable.c
index 879e19ab79e0..cade3045b3fc 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -309,6 +309,10 @@ PySymtable_BuildObject(mod_ty mod, PyObject *filename, PyFutureFeatures *future)
         PyErr_SetString(PyExc_RuntimeError,
                         "this compiler does not handle Suites");
         goto error;
+    case FunctionType_kind:
+        PyErr_SetString(PyExc_RuntimeError,
+                        "this compiler does not handle FunctionTypes");
+        goto error;
     }
     if (!symtable_exit_block(st, (void *)mod)) {
         PySymtable_Free(st);



More information about the Python-checkins mailing list