[C++-sig] strange registry behavior
jontwang at gmail.com
Mon Dec 18 20:17:16 CET 2006
On 12/18/06, Ralf W. Grosse-Kunstleve <rwgk at yahoo.com> wrote:
> Hi Jonathan,
> > >>> baz = foo + bar
> > Traceback (most recent call last):
> > File "<stdin>", line 1, in ?
> > File "/home/jwang1/eqvol/Analytic2/python/vector.py", line 75, in
> > return Vector(extract.getResult(calc))
> > TypeError: No Python class registered for C++ class std::vector<double,
> std::allocator<double> >
> It is difficult to help.
> What is Vector? A Python class?
> What is extract?
> What is calc?
> Does this fail?
> r = extract.getResult(calc)
> Or this?
Nevermind... I figured this out. The vector was getting returned with
return_internal_reference call policy, which requires a class to be
registered, not just a result converter. Switching the call policy fixed
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Cplusplus-sig