Mapping 64 bit int from C to Python-2.2 ?????

  • Thread starter Explore_Imagination
  • Start date
E

Explore_Imagination

Hi

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 following variables:

unit32_t a,b,c;
uint64_t w,x,y,z;

I use this funtion to map values:

Py_BuildValue( "(lllllll)", a,b,c,w,x,y,z );

As I access 32 bit values in Python it works fine BUT 64 bit intergers
in Pythong give garbage values . I think there may be a case of
overflow when 64 bit values in C are mapped to python.

I have tried by splitting 64-bit values but still it doesn't make any
difference :(

Any Suggestions?
 
M

Martin v. Löwis

Any Suggestions?

Read all of the responses you got the last time you posted the
very same article.

Regards,
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,123
Latest member
Layne6498
Top