[C++-sig] Boost.Python, AIX, and gcc
J. Michael Owen
mikeowen at llnl.gov
Wed Nov 5 02:13:12 CET 2003
OK -- here's the test. It's about as simple as it can be. :)
#include <iostream>
#include "boost/python.hpp"
using namespace std;
using namespace boost::python;
struct Base {
Base() { cerr << "Base()" << endl; }
virtual ~Base() { cerr << "~Base()" << endl; }
double get_x() const { return x; }
void set_x(const double val) { x = val; }
double x;
};
struct Derived: public Base {
Derived(): Base() { cerr << "Derived" << endl; }
virtual ~Derived() { cerr << "~Derived" << endl; }
double y;
};
BOOST_PYTHON_MODULE(Test) {
class_<Base>("Base", init<>())
.def("get_x", &Base::get_x)
.def("set_x", &Base::set_x)
.def_readwrite("x", &Base::x);
class_<Derived, bases<Base> >("Derived", init<>())
.def_readwrite("y", &Derived::y);
}
On Tuesday 04 November 2003 04:47 pm, Ralf W. Grosse-Kunstleve wrote:
> --- Mike Owen <mikeowen at comcast.net> wrote:
> > By the way, the test case I'm using to generate this error is really
> > small, so I could provide it if
> > that would be helpful. I'm not sure if that's useful, though, since you
> > have to have an AIX
> > machine handy to reproduce the problem.
>
> Having your test could be very useful anyway:
>
> - Maybe I can reproduce it on the Macintosh.
>
> - Maybe it gives Doug the right idea. He was looking for a type with 8-byte
> alignment and you seem to have one.
>
> Ralf
>
>
> __________________________________
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard
> http://antispam.yahoo.com/whatsnewfree
--
"Hey...where are the sunflower seeds?" | J. Michael Owen
o_o / | Phone: 925-423-7160
(") | Email: mikeowen at llnl.gov
\/'\/ |
____(__(,_,)_______________________________________________________________
More information about the Cplusplus-sig
mailing list