Issue 3612: Add some missing basic types in ctypes.wintypes (original) (raw)

Issue3612

Created on 2008-08-20 05:03 by ocean-city, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
add_some_missing_types.patch ocean-city,2008-08-20 05:03 done
adds_LPDWORD_and_friends.patch ocean-city,2008-08-20 14:57 fancy
avoid_giant_all.patch ocean-city,2008-08-20 20:11
avoid_giant_all_and_add_LPs.patch ocean-city,2008-08-20 20:27
avoid_giant_all_v2.patch ocean-city,2008-08-21 02:33
Messages (9)
msg71511 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2008-08-20 05:03
This patch adds some basic mssing types in ctypes.wintypes. I think pointer type like LPDWORD would be usuful too, but maybe you cannot ignore the overhead of POINTER object creation.
msg71534 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2008-08-20 10:21
I have no objections against this patch - feel free to check it in if it is not too late before the beta. Also I think that LPDWORD and friends are a good idea, you should extend the patch with them.
msg71539 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2008-08-20 13:15
I've committed basic type addition in r65908. Addition of LPDWORD and its friends will follow.
msg71547 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2008-08-20 14:57
I've created the patch which adds LPDWORD and friends. Can you review it?
msg71565 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2008-08-20 18:31
I think this is too fancy. I would prefer to spell the definitions out like this: LPDWORD = PDWORD = POINTER(DWORD) LPCSTR = LPSTR = c_wchar_p We could avoid the giant __all__ list when we 'import ctypes as _ctypes' and write (for example): DWORD = _ctypes.c_ulong
msg71571 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2008-08-20 20:11
>We could avoid the giant __all__ list when we 'import ctypes as >_ctypes' How about the attached patch "avoid_giant_all.patch"?
msg71572 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2008-08-20 20:27
And "avoid_giant_all_and_add_LPs.patch" adds bunch of LP(C)s. I'm not sure all LP types are needed. (Especially handle types)
msg71600 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2008-08-21 02:33
Module will be deleted at the end of file anyway (delete _ctypes), maybe we could just do "import ctypes" and "delete ctypes".
msg117548 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2010-09-28 21:09
Sorry for too late. I've committed in r85073(py3k).
History
Date User Action Args
2022-04-11 14:56:37 admin set github: 47862
2010-09-28 21:10:59 ocean-city set status: open -> closedstage: resolvedresolution: accepted -> fixedversions: + Python 3.2, - Python 2.6
2010-09-28 21:09:56 ocean-city set messages: +
2008-08-21 02:54:26 ocean-city set title: Add some basic mssing types in ctypes.wintypes -> Add some missing basic types in ctypes.wintypes
2008-08-21 02:33:58 ocean-city set files: + avoid_giant_all_v2.patchmessages: +
2008-08-20 20:27:05 ocean-city set files: + avoid_giant_all_and_add_LPs.patchmessages: +
2008-08-20 20:11:06 ocean-city set files: + avoid_giant_all.patchmessages: +
2008-08-20 18:31:00 theller set messages: +
2008-08-20 14:57:30 ocean-city set files: + adds_LPDWORD_and_friends.patchmessages: +
2008-08-20 13:15:26 ocean-city set messages: +
2008-08-20 10:21:05 theller set assignee: theller -> ocean-cityresolution: acceptedmessages: +
2008-08-20 05:03:51 ocean-city create