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

David M. Cooke cookedm at physics.mcmaster.ca
Tue Nov 22 14:04:48 CST 2005


On Nov 22, 2005, at 13:47 , Fernando Perez wrote:

> Andrew Straw wrote:
>> 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?
>
> OK, my bad again.  I'll stop trying to be useful with low-level  
> parts of the
> code I'm not truly intimately familiar with.  Two tries, two  
> mistakes, one too
> many.

Heh, don't worry about it. I'm not a fan of using "generic" names for  
types, and I think we should look at putting them under a namespace  
(using a prefix). I added the PY_ARRAY_TYPES_PREFIX to make it easy  
for a user to work around what I perceive as our deficiencies.

-- 
|>|\/|<
/------------------------------------------------------------------\
|David M. Cooke              http://arbutus.physics.mcmaster.ca/dmc/
|cookedm at physics.mcmaster.ca




More information about the Scipy-dev mailing list