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

jiangzuoyan at gmail.com jiangzuoyan at gmail.com
Thu Nov 8 14:38:01 CET 2012


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 <brandsmeier at 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 at python.org
> http://mail.python.org/mailman/listinfo/cplusplus-sig
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20121108/1ea4549d/attachment.html>


More information about the Cplusplus-sig mailing list