|
RE: Re: Error on linux: msg#00005python.ctypes
> From: Michele Petrazzo > Sent: Friday, 8 October 2004 7:32 PM > Thomas Heller wrote: > > > Michele Petrazzo <michele.petrazzo@xxxxxxxxx> writes: > > Ok, it seems I missed to put the create_unicode_buffer > inside an if: > > > > if os.name == "nt": > > > > I see this in __init__.py file > > > The deeper issue is that the unicode stuff in ctypes is > only compiled in > > when the Python header files define the > HAVE_USABLE_WCHAR_T symbol. Of > > the systems I build and test on, only Windows defines this. > > > > I'm not really sure that this is really the right thing to do, > > maybe this should be sufficient: > > > > #if Py_UNICODE_SIZE == 2 > > > I'm not a c developer, (also I'm not a python developer), so > where I put > this define? In python source? In ctypes source? > > And after, I can use create_unicode_buffer on linux? Maybe... I seem to recall that Redhat 9 & Fedora may be using UCS-4 by default. Have no idea about other Linux distros. I would also think that there's something wrong with the configure tests that lead to the HAVE_USABLE_WCHAR_T symbol - I'm quite surprised that Thomas is not finding this defined on his Linux systems, and I'll try and check my FreeBSD systems over the weekend. I would have thought that trying to use unicode from ctypes without a clear idea of the platform/python unicode status would be akin to Russian roulette... ----------------------------------------------------------------------- Andrew MacIntyre \ E-mail: andrew.macintyre@xxxxxxxxxx Planning Branch \ Tel: +61 2 6256 2812 Australian Broadcasting Authority \ Fax: +61 2 6253 3277 -> "These thoughts are mine alone!" <---------------------------------- ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Re: Error on linux: 00005, Michele Petrazzo |
|---|---|
| Next by Date: | Re: Re: Error on linux: 00005, Thomas Heller |
| Previous by Thread: | Re: Re: Error on linuxi: 00005, Thomas Heller |
| Next by Thread: | Re: Re: Error on linux: 00005, Thomas Heller |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |