[PATCH] [cindex.py] A NULL pointer shouldn't be compared to None.

Tobias Grosser tobias at grosser.es
Tue Mar 19 08:31:49 PDT 2013


On 03/19/2013 01:30 AM, Xavier Deguillard wrote:
> 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, pointer should be treated as boolean value, a NULL pointer
> being False.

Committed in r177408.

Thanks for the nice patch.

Tobi



More information about the cfe-commits mailing list