[Cython] planned C-API for decimal in Py3

Stefan Behnel stefan_ml at behnel.de
Thu Sep 4 09:20:54 CEST 2014


Hi,

there's CPython ticket (actually two of them) about providing a C level API
for the decimal implementation in Py3.3+, which is based on a separate C
library (libmpdec). This would allow unboxing Decimal objects and working
directly with the underlying libmpdec values.

"access to cdecimal / libmpdec API"
http://bugs.python.org/issue22194

"Add capsule API to _decimal"
http://bugs.python.org/issue15237

Direct access to libmpdec (which is linked into _cdecimal on some
platforms) requires exporting the symbols. If anyone has experience with
that on less common or less straight forward platforms, a comment in the
first ticket would certainly be appreciated.

Stefan


More information about the cython-devel mailing list