[C++-sig] Call policies choice

Coockie_jr achille.talon at gmail.com
Wed Aug 8 15:26:03 CEST 2007

Thanks that helped (and the sleeping part too I guess) !
I've got another issue

I'm wrapping a "list" class 

class NeoList: public NeoCollection{
	virtual void set(unsigned short index,NeoMsgType* pType);
	virtual NeoMsgType* get(unsigned short index) const;

class NeoText:public NeoMsgType{
	explicit NeoText(const string& str);
	virtual string toString()const{return m_string;}

class NeoMsgType
	explicit NeoMsgType(uint8_t idType = 0xff);
	virtual ~NeoMsgType(){}
	virtual string toString() const = 0;


But there seems to be a problem with the get function  because when I test
the generated .pyd with python and this example

import neolib
n = neolib;
message1 = n.NeoText('first message');
message2 = n.NeoText('2ndmessage');
l = n.NeoList();
recup1 = l.get(1);
recup2 = l.get(2);
print "type of recup1 : %s " % recup1;

I get that recup1 is a none type.
I suppose this is a call policy issue as well.

I tried with internal_reference and others but I get the same result.
With copy_const_reference the lib doesn't compile.

Any clue ?

Thank you

View this message in context: http://www.nabble.com/-C%2B%2B-sig--Call-policies-choice-tf4191655.html#a12053112
Sent from the Python - c++-sig mailing list archive at Nabble.com.

More information about the Cplusplus-sig mailing list