Ronald Oussoren <ronaldousso...@mac.com> added the comment:

This is almost certainly not a bug in Python, but in the code in this issue.


CGEventGetLocation() is a function that returns a CGPoint, while ctypes assumes 
that function returns value of C type int. The effect of this is that ctypes 
will create the wrong stack frame during the call and that messes things up. 

That this works in 32-bit mode is more or less an accident, the calling 
conventions in 32-bit mode are different than that in 64-bit mode and this 
happens to work.

To get this code to function correctly you need to add annotations to the 
function object using ctypes, that documentation for ctypes in the stdlib 
reference explains how to do so.

I therefore propose to close this issue.

----------
nosy: +ronaldoussoren
type:  -> crash

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11464>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to