Mapping 64 bit int from C to Python-2.2

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I want to map 64 bit integers from C to python. I must use Python 2.2
BUT There is no support for 64 bits integers in Python2.2 (Supported
in 2.5).

Now the problem is that I have these four variables:

uint64_t w,x,y,z;

I use this funtion to map values:

Py_BuildValue( "(llll)", w,x,y,z );

But when I access them in Python it gives garbage values. I think
there is an overflow when 64 bit values in C are mapped to python.

Any Suggestions?

Re: Mapping 64 bit int from C to Python-2.2

Explore_Imagination schreef:
Quoted text here. Click to load it



So you post to a PHP group??

Erwin Moller

"There are two ways of constructing a software design: One way is to
make it so simple that there are obviously no deficiencies, and the
other way is to make it so complicated that there are no obvious
deficiencies. The first method is far more difficult."
-- C.A.R. Hoare

Site Timeline