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: Add some missing basic types in ctypes.wintypes
Type: Stage: resolved
Components: ctypes Versions: Python 3.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ocean-city Nosy List: ocean-city, theller
Priority: normal Keywords: patch

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:37adminsetgithub: 47862
2010-09-28 21:10:59ocean-citysetstatus: open -> closed
stage: resolved
resolution: accepted -> fixed
versions: + Python 3.2, - Python 2.6
2010-09-28 21:09:56ocean-citysetmessages: + msg117548
2008-08-21 02:54:26ocean-citysettitle: Add some basic mssing types in ctypes.wintypes -> Add some missing basic types in ctypes.wintypes
2008-08-21 02:33:58ocean-citysetfiles: + avoid_giant_all_v2.patch
messages: + msg71600
2008-08-20 20:27:05ocean-citysetfiles: + avoid_giant_all_and_add_LPs.patch
messages: + msg71572
2008-08-20 20:11:06ocean-citysetfiles: + avoid_giant_all.patch
messages: + msg71571
2008-08-20 18:31:00thellersetmessages: + msg71565
2008-08-20 14:57:30ocean-citysetfiles: + adds_LPDWORD_and_friends.patch
messages: + msg71547
2008-08-20 13:15:26ocean-citysetmessages: + msg71539
2008-08-20 10:21:05thellersetassignee: theller -> ocean-city
resolution: accepted
messages: + msg71534
2008-08-20 05:03:51ocean-citycreate