[SciPy-dev] patch: allow arrayobject.h to compile in c++ compiler

Andrew Straw strawman at astraw.com
Tue Nov 22 11:49:06 EST 2005


Sorry, my mistake! It turns out that OpenProducer (part of
OpenSceneGraph) must do "typedef int Bool", and so this, combined with
arrayobject.h's "typedef undefined char Bool" results in the
"redeclaration of int" compiler error.  So, you're right, Bool is not
defined in C++, and its probaby safest to remove my patch.  But would it
make sense to rename Bool to ScipyBool or something less likely to
defined in other source?

Travis Oliphant wrote:

>Andrew Straw wrote:
>
>  
>
>>Bool is defined in C++ compilers, so if arrayobject.h defines Bool, the
>>compiler issues an error: "redeclaration of C++ built-in type `int'".
>>
>> 
>>
>>    
>>
>I thought C++ defined bool.   This was recently changed from bool to 
>Bool precisely for C++ compilers.  Now you tell me that C++ compilers 
>define Bool as well?
>
>The problem with the patch is what is sizeof(Bool) on those C++ 
>compilers?  Is it 1?
>
>-Travis
>
>_______________________________________________
>Scipy-dev mailing list
>Scipy-dev at scipy.net
>http://www.scipy.net/mailman/listinfo/scipy-dev
>  
>




More information about the SciPy-Dev mailing list