[issue17870] Python does not provide PyLong_FromIntMax_t() or PyLong_FromUintMax_t() function

STINNER Victor report at bugs.python.org
Wed May 1 00:06:19 CEST 2013


STINNER Victor added the comment:

Here is a first patch adding the following functions:

    PyObject* PyLong_FromIntMax_t(intmax_t v);
    PyObject* PyLong_FromUintMax_t(uintmax_t v);
    intmax_t PyLong_AsIntMax_t(PyObject *pylong);
    uintmax_t PyLong_AsUintMax_t(PyObject *pylong);

I used AC_TYPE_INTMAX_T and AC_TYPE_UINTMAX_T in configure.ac, so intmax_t and uintmax_t are defined if the platform does not provide them. (I guess that these types are defined in pyconfig.h.) On Windows, Visual Studio 2010 supports stdint.h, and so these types are available.

autoheader && autoconf must be called to regenerate configure script and pyconfig.h.in template.

----------
keywords: +patch
Added file: http://bugs.python.org/file30082/intmax_t.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17870>
_______________________________________


More information about the Python-bugs-list mailing list