Skip to content
Commit 14a2d7b9 authored by Tobias Grosser's avatar Tobias Grosser
Browse files

cindex.py: Handle NULL pointers when parsing translation units



The code inside cindex.py was comparing NULL pointer returned by
clang_parseTranslationUnit and clang_createTranslationUnit with None.
However, as illustrated by the two tests I've added, those conditions
were ineffective which resulted in assert triggering later on.

Instead, a pointer is now treated as a boolean value, a NULL pointer being
False.

Contributed-by: default avatarXavier Deguillard <deguilx@gmail.com>
llvm-svn: 177408
parent 9a8f0f55
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment