[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] mintlib wide character overhaul
On 02/22/13 01:21, Jeffrey Armstrong wrote:
Hey folks, I've been working on getting Python up and running on MiNT,
specifically Python 3.3, the current release. While Python 2.x is
relatively simple to build under MiNT, there were a number of problems
with Python 3. The most notable issue was related to MiNTLib's
incomplete wide character support. Unlike earlier Python versions, the
3.x series uses unicode almost exclusively internally.
I first attempted simply providing some of the missing functions,
notably wcschr() and wcstok(), but the additions weren't adequate.
The wide character support in MiNTLib didn't seem to be functional.
If I'm mistaken, please feel free to correct me.
As a solution, I rolled in multibyte and wide character support from
the musl standard library (http://www.musl-libc.org/), a small libc
implementation that is MIT-licensed and specializes in efficient
static linking. The code now present seems to be functional within
MiNTLib.
I've hosted my code on Github based on a CVS pull 2013-01-15 after the
malloc() bug was committed. If anyone is interested, the link to the
modified code is:
https://github.com/ArmstrongJ/MiNTLib/tree/py3k-improvements
The changes also incorporate a relatively dumb implementation of
nl_langinfo and a stand-in sched_yield implementation.
Everything compiles fine under GCC 2.95 and one of the MiNT-hosted GCC
4.x builds available.
Additionally, with these changes, Python 3.3 builds and runs fine
under MiNT (with one pending Python core patch and one committed
Python core patch) using GCC 2.95. I'm guessing it'll build fine
under 4.x if anyone's interested.
I'm hoping people might be interested in pulling in these changes to
MiNTLib's CVS. Any comments on the code are welcome!
Hi Jeff,
Yes, I'm certainly interested in this, but I'm also interested in how
you've tested the new code. Have you run the new widechar support
against any test suite, rather than just compiling it against Python 3.3.0 ?
I'll take a longer look at the patches this weekend.
Thanks for taking the time on this.
Alan.