Python/C: unsigned Py_BuildValue, PyInt_FromLong

Christian Vogel usenet_chris at hedonism.cx
Wed Feb 25 19:51:21 CET 2004


Hi comp.lang.python readers,

are there routines to create a Python integer from unsigned C-integers?

I only could find Py_BuildValue[1] and PyInt_FromLong[2] which both only use
signed c-integers. Is there another way I overlooked?

[1]: http://www.python.org/doc/2.3.3/api/arg-parsing.html
        ParseValue knows "k" for unsigned long, BuildValue doesn't.

[2]: http://www.python.org/doc/2.3.3/api/intObjects.html
        PyInt_FromLong only uses a signed integer.

        Chris



More information about the Python-list mailing list