On 21.03.2010 06:07, Roman Yakovenko wrote:
On Sat, Mar 20, 2010 at 11:10 PM, Maciej Sitarz wrote:
Just one more comment...
The constructor takes reference to vector, so I suspect
that maybe it will be filled there by some other code I don't have? So I
don't need to fill the vector, just to cr
On Sun, Mar 21, 2010 at 10:06 AM, Maciej Sitarz wrote:
> Yes, it works, because there's no code generated for std::vector
> Try adding this function to item_t class:
> void fund( std::vector& v) { }
>
> And then it doesn't compile successfully.
>
> When I comment this line from the generated code:
Ok, it does work as expected if class Base has got at least one virtual member:
from shared_ptr_inheritance import *
type( base1() ) -> Base
type( base2() ) -> Derived
type( derived1() ) -> Derived
type( base3( derived1() ) ) -> Derived
type( derived2( base2() ) ) -> Derived
Anyhow it looks like
On Sun, Mar 21, 2010 at 4:12 PM, peoro wrote:
> Ok, it does work as expected if class Base has got at least one virtual
> member:
>
> from shared_ptr_inheritance import *
> type( base1() ) -> Base
> type( base2() ) -> Derived
> type( derived1() ) -> Derived
> type( base3( derived1() ) ) -> Derive
peoro wrote:
Ok, it does work as expected if class Base has got at least one virtual member:
...What if I cannot add a virtual function to the class Base?
If your C++ base class has no virtual methods, even pure C++ can't
dynamic_cast<> it.
Put differently -- you've been asking Python to d
The code I'm trying to wrap doesn't rely on RTTI, that's why there are
no virtual functions.
(I agree that RTTI would be better from about any point of view, but
this piece of software isn't using it)
There should be no need of dynamic_cast or any kind of run time type
checking since the program h
Skip Montanaro wrote:
Do Boost.Python-generated extension modules conform to PEP 384's
constraints for ABI compatibility?
Thanks for pointing that out. Without looking too closely, I doubt that
boost.python conforms.
I'd give it a try, but it looks like I need to wait for python 3.2, then
I'm sorting through the umpteen generations of documentation and mailing
lists preserved forever on internet and trying to determine how to be wrap
this third party pseudo-vector class. (OMG folks like to write their own
types for everything) The OMG sequence does provide operator[], and I need
to
peoro wrote:
There should be no need of dynamic_cast or any kind of run time type
checking since the program has got static knowledge of types:
The C++ program may have that knowledge. All I'm saying is that your
original issue concerned Python determining the runtime type (leaf
class) of e
Hi Jim,
Well, the code's rather official, so i won't be able to give the exact
details, but here's the code simplified:
CFunctionRequest( pData, (DWORD*)&ucmmReq.len)
where pData is BYTEpData[512];
and
typedef struct
{
int len;
char* data;
} Data;
with DataucmmReq
The definition for the
On Fri, 2010-03-19 at 14:45 +0800, hitesh dhiman wrote:
> > Hi all,
> > I'm trying to gain access to functions that use pointers as
> > arguments. I have written the wrapper file that converts the
> arguments
> > into pointers. The compilation works successf
11 matches
Mail list logo