Boost logo

Boost :

From: rwgk_at_[hidden]
Date: 2000-11-03 16:52:07


Revision 1.3 of pyptr.h works a lot better!

When compiling py_cpp with boost 1.18.1 there are no errors and no
warnings and both test_*.py check out fine.

However, there is a problem with gen_extclass.py.
See below for details and the fix.

Thanks!
        Ralf

gen_extclass.py appears not to be up-to-date.
Here is the diff which works for me:

437d436
< add_base(Ptr(as_object(base), Ptr::new_ref));
438a438,442
> Class<ExtensionInstance>* target = (bases().size() == 0)
> ? this
> : Downcast<Class<ExtensionInstance> >(bases()[0].get
()).get();
> target->add_base(Ptr(as_object(base), Ptr::new_ref));
>
453c457,461
< add_base(Ptr(as_object(base), Ptr::new_ref));

---
>
>         Class<ExtensionInstance>* target = (bases().size() == 0)
>             ? this
>             : Downcast<Class<ExtensionInstance> >(bases()[0].get
()).get();
>         target->add_base(Ptr(as_object(base), Ptr::new_ref));
--- In boost_at_[hidden], "David Abrahams" <abrahams_at_m...> wrote:
> It's a bug in my code which is not caught by MSVC or GCC (time for 
me to
> start testing with Comeau). Actually, it was caught by Metrowerks, 
but the
> error message was a little too cryptic for me to diagnose the 
problem. Try
> grabbing pyptr.h from
> http://cvs.sourceforge.net/cgi-
bin/cvsweb.cgi/boost/development/py_cpp/pyptr
> .h?cvsroot=boost. I think that will solve your problems.
> 
> -Dave
> ----- Original Message -----
> From: <rwgk_at_m...>
> To: <boost_at_[hidden]>
> Sent: Friday, November 03, 2000 1:36 PM
> Subject: [boost] py_cpp_20001102 Alpha woes
> 
> 
> > When trying to compile the latest py_cpp release 
(py_cpp_20001102.zip)
> > on the Alpha I get the error message which is attached below. I 
tried
> > using both boost 1.18.1 and the latest boost snapshot from the
> > sourceforge CVS tree. The error messages appear to be the same in
> > both cases.
> > Compilation and tests worked well with the previous py_cpp 
release.
> > What could be wrong?
> > Thanks!
> >         Ralf
> >
> >
> > cxx -I/usr/local/STLport-4.1b3/stlport -D__USE_STD_IOSTREAM  -
> > D__STL_NO_SGI_IOSTREAMS  -D__STL_NO_NEW_C_HEADERS  -
> > D_RWSTD_COMPILE_INSTANTIATE=1 -I/net/boa/scratch1/rwgk/boost -
> > I/usr/local/include/python1.5 -I..  -std strict_ansi -msg_disable
> > 186,450,1115  -c extclass.cpp
> > cxx: Error: pyptr.h, line 81: a value of type "PyObject *" cannot 
be
> > used to
> >           initialize an entity of type "py::Function *"
> >           detected during:
> >             instantiation of "py::PyPtr<T>::PyPtr(T2 *,
> > py::PyPtr<T>::NewRef)
> >                       [with T=py::Function, T2=PyObject]" at line 
31
> >             instantiation of class "py::PyPtrConversions<T, Base>
> > [with
> >                       T=py::PyPtr<py::Function>,
> >
> > Base=boost::dereferenceable<py::PyPtr<py::Function>,
> >                       py::Function *, 
boost::detail::empty_base>]" at
> > line 42
> >                       of "functions.h"
> >         : m_p(expect_non_null(x)) { Py_INCREF(object()); }
> > --------------^
> >
> >
> >
> >
> >

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