From: Robert Bradshaw Date: Sun, 3 Oct 2010 06:40:57 +0000 (-0700) Subject: #579 - compiler crash on invalid buffer type X-Git-Tag: 0.14.alpha0~305 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2b8bff70e1a631806fac71b211e9b35996e09897;p=cython.git #579 - compiler crash on invalid buffer type --- diff --git a/Cython/Compiler/Interpreter.py b/Cython/Compiler/Interpreter.py index 0acbd923..298041d0 100644 --- a/Cython/Compiler/Interpreter.py +++ b/Cython/Compiler/Interpreter.py @@ -37,7 +37,10 @@ def interpret_compiletime_options(optlist, optdict, type_env=None, type_args=()) def interpret(node, ix): if ix in type_args: if type_env: - return (node.analyse_as_type(type_env), node.pos) + type = node.analyse_as_type(type_env) + if not type: + raise CompileError(node.pos, "Invalid type.") + return (type, node.pos) else: raise CompileError(node.pos, "Type not allowed here.") else: