No subject


Tue Oct 14 00:29:20 CEST 2008


wrapper like

Blob createBlob(const std::string data) {
	return Blob(data.str(),data.size());
}

Can I pass this funktion to boost.python in a way, that I could be used as
ctor? Something like this:

class_<Blob>("Blob",init<>())
    .def( ??? , createBlob );

and then from Python:

data = "a string with data to be passed to the blob"
blob = Blob(data)

regards,
Achim





More information about the Cplusplus-sig mailing list