[Patches] [ python-Patches-1703286 ] bug fix: ctypes truncates 64-bit pointers

SourceForge.net noreply at sourceforge.net
Thu Apr 19 07:56:35 CEST 2007


Patches item #1703286, was opened at 2007-04-18 15:09
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1703286&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core (C code)
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Alexander Belopolsky (belopolsky)
Assigned to: Nobody/Anonymous (nobody)
Summary: bug fix: ctypes truncates 64-bit pointers

Initial Comment:
At several places _ctypes module converts a python integer to a void* pointer by first extracting an argument into an int.  Attached patch changes int to Py_ssize_t that is guaranteed to be wide enough to hold a pointer. 

----------------------------------------------------------------------

>Comment By: Neal Norwitz (nnorwitz)
Date: 2007-04-18 22:56

Message:
Logged In: YES 
user_id=33168
Originator: NO

Thanks for the patch.  The changes look correct, however, can you create a
test for these cases?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1703286&group_id=5470


More information about the Patches mailing list