I would appreciate if the correctness off this change could be
verified by someone on Windows (32- and 64-bit) as I'm not currently
in a position to do so. anatoly and I believe it is correct.


     Richard

On 7 January 2013 10:18,  <[email protected]> wrote:
> Revision: 078133f990a0
> Branch:   default
> Author:   Richard Jones <[email protected]>
> Date:     Sun Jan  6 15:18:42 2013
> Log:      replace unportable (across Python implementations) test with more
> explicit one; thanks anatoly
> http://code.google.com/p/pyglet/source/detail?r=078133f990a0
>
> Modified:
>  /pyglet/libs/win32/__init__.py
>
> =======================================
> --- /pyglet/libs/win32/__init__.py      Sun Jun 10 04:13:07 2012
> +++ /pyglet/libs/win32/__init__.py      Sun Jan  6 15:18:42 2013
> @@ -1,12 +1,15 @@
>  #!/usr/bin/python
>  # $Id: $
>
> +import struct
>  from ctypes import *
>
>  import pyglet
>  import constants
>  from types import *
>
> +IS64 = struct.calcsize("P") == 8
> +
>  _debug_win32 = pyglet.options['debug_win32']
>
>  if _debug_win32:
> @@ -189,7 +192,7 @@
>  _user32.SetCapture.argtypes = [HWND]
>  _user32.SetClassLongW.restype = DWORD
>  _user32.SetClassLongW.argtypes = [HWND, c_int, LONG]
> -if tuple.__itemsize__ == 8:
> +if IS64:
>      _user32.SetClassLongPtrW.restype = ULONG
>      _user32.SetClassLongPtrW.argtypes = [HWND, c_int, LONG_PTR]
>  else:

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en.

Reply via email to