[SciPy-dev] Re: [Scipy-cvs] world/scipy/weave/scxx object.h,1.8,1.9 sequence.h,1.3,1.4

eric jones eric at enthought.com
Sat Oct 12 06:46:55 EDT 2002


Hey Thanks!  I'm glad to know what was happening here.

For now I'll leave it off so that it doesn't crop up as a problem on
other platforms -- it isn't really that critical.  Once we get most of
the other stuff ironed out, we can look at adding it back in.
Currently, there aren't any ifdefs.  That probably won't last long, but
I'm loath to add them right now. :-)

eric

----------------------------------------------
eric jones                    515 Congress Ave
www.enthought.com             Suite 1614
512 536-1057                  Austin, Tx 78701 


-----Original Message-----
From: scipy-dev-admin at scipy.net [mailto:scipy-dev-admin at scipy.net] On
Behalf Of Pearu Peterson
Sent: Saturday, October 12, 2002 4:13 AM
To: scipy-dev at scipy.org
Subject: [SciPy-dev] Re: [Scipy-cvs] world/scipy/weave/scxx
object.h,1.8,1.9 sequence.h,1.3,1.4


On Fri, 11 Oct 2002 eric at localhost.localdomain wrote:

> Update of /home/cvsroot/world/scipy/weave/scxx
> In directory shaft:/tmp/cvs-serv27620
> 
> Modified Files:
> 	object.h sequence.h 
> Log Message:

> removed the not() operator from object.h.  For some reason, it was
> causing problems in gcc 3.2 -- is it reserved or something?  Anyway, I
> haven't used it and don't consider it to be critical at the moment, so
> I've just commented it out until there is more time to look it over.

not is C++ operator:

  bool operator not() const {
    return PyObject_Not(_obj) == 1;
  };

works in gcc 3.0 and 3.1 but not in gcc 2.95. The following works in all
versions of gcc:

#if defined(__GNUC__) && __GNUC__ < 3
  bool not() const {
#else
  bool operator not() const {
#endif
    return PyObject_Not(_obj) == 1;
  };

I don't know which one road works for other C++ compilers but my guess
would be the #else part provided that these compilers follow C++
standard
closely.

Pearu

_______________________________________________
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