Dear list,

well thanks to point out `builtin_converters.cpp`, I wasn't aware that
that file exists. Usually everything is in header files. I tried to
implement some converter using `slot_rvalue_from_python` in my own
code. But I did not have any success with having my function called by
boost python.

Can I somehow deregister the converter for `long double` that boost
python adds via `builtin_converters.cpp`?

If I change the source for `builtin_converters.cpp` to not export any
converter for `long double`. Can I then later in my code register a
converter via `slot_rvalue_from_python` that will be called? I never
compiled my own version of boost before, so it would help me to know
if this would actually work.

-Holger



On Thu, Nov 8, 2012 at 2:38 PM, jiangzuo...@gmail.com
<jiangzuo...@gmail.com> wrote:
> I'm afraid of you can't, according to the code, it's implemented in
> builtin_converters.cpp:
>
>     slot_rvalue_from_python<long double,float_rvalue_from_python>();
>
> Boost/Python using global registration only according type saw in C++, I
> don't known is it possible to overrides these.
>
>                                                       Changsheng Jiang
>
>
> On Thu, Nov 8, 2012 at 7:23 PM, Holger Brandsmeier <brandsme...@gmx.de>
> wrote:
>>
>> Dear list,
>>
>> where does boost python define the from python converters for buildin
>> types such as double / PyLong_Type?
>>
>> With the help of Changsheng Jiang I was able to modify
>> builtin_converters.hpp and was able to change a to python converter
>> for long double to produce numpy.float128. I do not find the place
>> where the from python conversion is done, though.
>>
>> -Holger
>> _______________________________________________
>> Cplusplus-sig mailing list
>> Cplusplus-sig@python.org
>> http://mail.python.org/mailman/listinfo/cplusplus-sig
>
>
>
> _______________________________________________
> Cplusplus-sig mailing list
> Cplusplus-sig@python.org
> http://mail.python.org/mailman/listinfo/cplusplus-sig
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to