delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-0.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,TW_BF |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <4D2C4F8C.40508@x-ray.at> |
Date: | Tue, 11 Jan 2011 13:39:40 +0100 |
From: | Reini Urban <rurban AT x-ray DOT at> |
User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.16) Gecko/20101123 SeaMonkey/2.0.11 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
CC: | Xiaofan Chen <xiaofanc AT gmail DOT com> |
Subject: | Re: Fwd: [ctypes-users] pyusb under Cygwin and stdcall libusb-1.0 |
References: | <AANLkTim9GD+uGWVAcCFqpEbOtbwDTAO2=kzp8zF--HY+@mail.gmail.com> |
In-Reply-To: | <AANLkTim9GD+uGWVAcCFqpEbOtbwDTAO2=kzp8zF--HY+@mail.gmail.com> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |