This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Patch for ctypes to enable custom objects in function calls
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: theller Nosy List: nnorwitz, theller
Priority: normal Keywords: patch

Created on 2006-07-05 20:39 by theller, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
from_param.patch theller, 2006-07-05 20:39 Patch for ctypes
Messages (4)
msg50613 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2006-07-05 20:39
This patch allows to use custom objects as parameters
in foreign function calls.  The patch is very simple
(actually it is more like a simple bug fix).  Tests and
documentation included.

The patch is against the SF CVS ctypes repository,
because it is simple to read imo.

I'm requesting permission to apply this patch to Python
current SVN before the next beta release.
msg50614 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2006-07-06 03:50
Logged In: YES 
user_id=33168

Is i a Py_ssize_t?  If so the format string should use %zd.

This patch is acceptable for 2.5.  Please update Misc/NEWS
when you checkin.  Also, please try to get this in ASAP so
we get as much testing as possible.
msg50615 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2006-07-06 08:43
Logged In: YES 
user_id=11105

No, i is an int.  As it counts items (the number of args
passed to a function call) maybe unsigned would be better
but its not worth to change it.

Thanks.
msg50616 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2006-07-06 09:12
Logged In: YES 
user_id=11105

Committed as revision r47263 and r47265.
History
Date User Action Args
2022-04-11 14:56:18adminsetgithub: 43619
2006-07-05 20:39:43thellercreate