Re: [C++-sig] From python converter for builtin types

2012-11-08 Thread jiangzuo...@gmail.com
I'm afraid of you can't, according to the code, it's implemented in builtin_converters.cpp: slot_rvalue_from_python(); Boost/Python using global registration only according type saw in C++, I don't known is it possible to overrides these.

Re: [C++-sig] buildin converter for long double

2012-11-05 Thread jiangzuo...@gmail.com
how about return a wrap type of long double to cheating boost/python, and register youself converter as PyObject * o = PyArrayScalar_New(LongDouble); PyLongDoubleScalarObject * s = (PyLongDoubleScalarObject*)o; s->obval = value; Don't forget to call import_array() in your model init functio