Bugs item #1651235, was opened at 2007-02-03 15:05
Message generated for change (Comment added) made by theller
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1651235&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: Python Library
Group: Python 2.5
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Gary Bishop (tgbishop)
Assigned to: Thomas Heller (theller)
Summary: ctypes.Structure formal parameter dies given tuple
Initial Comment:
With a structure like:
class CvRect(ctypes.Structure):
_fields_ = [("x", ctypes.c_int),
("y", ctypes.c_int),
("width", ctypes.c_int),
("height", ctypes.c_int)]
and a foreign function like:
cvSetImageROI = _cxDLL.cvSetImageROI
cvSetImageROI.restype = None # void
cvSetImageROI.argtypes = [
ctypes.c_void_p, # IplImage* image
CvRect # CvRect rect
]
The call
cvSetImageROI(img, CvRect(1,2,3,4))
works fine but the mistaken call:
cvSetImageROI(img, (1,2,3,4))
Produces the "Send Error Report" dialog from Windows.
Other erroneous arguments produce a message about correct argument type but the
tuple triggers some other behavior.
----------------------------------------------------------------------
>Comment By: Thomas Heller (theller)
Date: 2007-03-09 21:50
Message:
Logged In: YES
user_id=11105
Originator: NO
Fixed in rev. 54248 (trunk) and rev. 54249 (release25-maint).
Thanks for the report.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1651235&group_id=5470
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com