Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2001-03-02 21:40:20


OK, I will clearly have to try to make this work with Python 2.0. I've
installed it, but haven't tried to use it yet.

1. Can you tell me why you thought the proposed changes would fix your
problem?
2. Can you send me an exact description of the change you applied to your
local copy (i.e. a patch)?

-Dave

----- Original Message -----
From: <limberm_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Friday, March 02, 2001 1:48 PM
Subject: [boost] Re: BOOST_DEBUG_PYTHON

> --- In boost_at_y..., "David Abrahams" <abrahams_at_m...> wrote:
> > The fix is now in the CVS repository.
> > BTW, how was this showing up as a symptom? My analysis shows that
> the code I
> > was using should have been equivalent.
> >
>
> Hi All,
>
> I got two files from CVS: base_object.hpp and wrap_python.hpp.
>
> I still get the same problem: object.c, _Py_ForgetReference,
> op->_ob_prev = NULL.
>
> My example is simple. I built bpl_static with BOOST_DEBUG_PYTHON
> defined. I then built the following:
>
> class Dog
> {
> public:
> Dog(){}
> ~Dog(){}
> };
>
>
> extern "C"
> {
> #ifdef _WIN32
> __declspec(dllexport)
> #endif
> void initKenel()
> {
> try
> {
> // create an object representing this extension module
> boost::python::module_builder kenelModule("Kenel");
>
> // Dog
> boost::python::class_builder<Dog> Dog_class(kenelModule,
> "Dog");
> Dog_class.def(boost::python::constructor<>());
> }
> catch(...)
> {
> boost::python::handle_exception(); // Deal with the
> exception for Python
> }
>
> }
>
> } // extern C
>
> int main(int argc, char **argv)
> {
> //Initialize the Python interpreter. Required.
> Py_Initialize();
>
> // initialize my module!
> initKenel();
> /* Do some application specific code */
> printf("Hello, brave new world\n\n");
>
> /* Execute some Python statements (in module __main__) */
> PyRun_SimpleString("import Kenel\n");
> printf("\nGoodbye, cruel world\n");
>
> /* Exit, cleaning up the interpreter */
> Py_Finalize();
>
> return 0;
> }
>
> I made sure Python20_d.lib/dll were accessible.
> I build in Debug, and run it. VC++6.0, SP4.
>
> mark
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk