Py_BuildValue format code for unsigned int ?

Mike C. Fletcher mcfletch at rogers.com
Wed Feb 25 05:26:05 EST 2004


*PyLong_FromUnsignedLong to get a PyObject * to a Python long object, 
then use the N format to steal the reference you're creating with 
**PyLong_FromUnsignedLong.

HTH,
Mike
*
Helmut Jarausch wrote:

> Hi,
>
> is there a format code to return an unsigned int to Python via 
> Py_BuildValue? Just using code 'i' gives negative values for values 
> greater than 2**31.
>
> I've tried the code 'I' (with python 2.4 cvs) but that's not accepted.
>
> Many thanks for a hint,
>
> ---
> Helmut Jarausch
> RWTH-Aachen University
> Germany


-- 
_______________________________________
  Mike C. Fletcher
  Designer, VR Plumber, Coder
  http://members.rogers.com/mcfletch/






More information about the Python-list mailing list