[C++-sig] BPL and Py_Clear()

Niall Douglas s_sourceforge at nedprod.com
Wed Jun 15 12:49:11 CEST 2005


On 14 Jun 2005 at 9:01, David Abrahams wrote:

> >> >> > Why doesn't BPL's ptr() accept pointers to integral types?
> >> >> 
> >> >> Think about how you would implement such a thing.  What would a
> >> >> an overriden virtual function written in Python see?
> >> >
> >> > A single item of whatever type eg; long * would mean the python
> >> > code sees a python integer.
> >> 
> >> I'm confused now.  If you pass an int* without wrapping it in ptr()
> >> that's exactly what happens, right?
> >
> > I don't know about int, but unsigned int * yields a runtime error of
> > no to-python converter for unsigned int.
> 
> Oh, drat.  But then, why not just dereference the pointer and pass
> that?

Because I want to pass the pointer, not what it points to. I suppose 
I could have pyste cast it to void_.

Cheers,
Niall






More information about the Cplusplus-sig mailing list