This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fwd: [ctypes-users] pyusb under Cygwin and stdcall libusb-1.0


Xiaofan Chen schrieb:
Just wondering if I can have the answer here. Thanks.
Please CC me as I am not subscribed. Thanks.

> The author asks if Cygwin libusb-1.0 should use stdcall or not? > > http://sourceforge.net/mailarchive/message.php?msg_id=26873777 > > > > Normal Python under Windows can support either cdecl (CDLL) or > > stdcall (WinDLL). The problem is that Cygwin Ctypes only supports > > cdecl. Therefore it is not possible to load cygusb-1.0.dll and pyusb's > > libusb-1.0 backend will not work under Cygwin as a result. > > > > Just wondering why Ctypes under Cygwin does not support > > WinDLL? Take note os.name == 'posix' under Cygwin Python. > > I have updated Cygwin installation to the latest version. > > > > Just wondering why Ctypes under Cygwin does not support > > WinDLL? Take note os.name == 'posix' under Cygwin Python.

>That really is a question for the maintainer of Python on Cygwin.  It
>may be because the necessary libffi plumbing isn't in yet place on that
>platform.

Both libffi and Ctypes should support stdcall.
I'm helping out with the perl Ctypes equivalent,
and cdecl, stdcall and both 64bit fastcalls do
work perfectly there.

It just looks like cygwin python has no WinDLL support yet.

>>> from _ctypes import FUNCFLAG_STDCALL as _FUNCFLAG_STDCALL
ImportError: cannot import name FUNCFLAG_STDCALL

>>> import ctypes.wintypes
  File "/usr/lib/python2.6/ctypes/wintypes.py", line 23, in <module>
    class VARIANT_BOOL(_SimpleCData):
ValueError: _type_ 'v' not supported
--
Reini Urban
http://phpwiki.org/  http://murbreak.at/

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]