[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] mintlib wide character overhaul



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!

-Jeff

Jeff Armstrong - jba@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org