Based on LuaLDAP, contributed by zhiguo zhao, modified by myself.
Since I don't have a Mac available I took the normalized output Michal sent me* and used Python's unicodedata.normalize() function to find out which normalization form was being applied, then applied that form of normalization to each Unicode string used in the io_dir tests. I'm not sure if Unicode normalization is always enabled on Macs, in that case every Mac user running the test suite will from now on get a warning when the test suite detects Unicode normalization being applied :-). Really, I understand the problems the Mac OS X folks were trying to solve, but how is this an improvement, when you create a directory or file, get no errors or warnings, but then when you check the file doesn't exist under the name you gave it :-\. To summarize: nasty problem, wrong solution! * #10 (comment) 67 97 115 115 105 117 115 32 45 32 65 117 32 82 101 204 130 118 101
The Lua/APR binding now contains proper serialization support based on the excellent table-to-source serializer included in Metalua. Here's what I've added to / changed about the serialization function: - Support for numbers with large precision (e.g. the Metalua table-to-source serializer cannot round trip math.pi and math.huge without changing the values) - Support for Lua functions with upvalues (the Metalua table-to-source serializer doesn't support upvalues) - Support for userdata objects created by the Lua/APR binding (based on a reference mechanism using UUID values) - Lots of dedicated tests for the serializer, and of course it's also getting tested by the multi threading tests In the process of adding serialization support I've rewritten the multi threading tests to take advantage of the new support for upvalues. I've also removed apr.thread() and renamed apr.thread_create() to apr.thread() because it now has full support for serialization of functions (the documentation has been updated accordingly).
Also reformatted some TODO notes and converted ldap.c to UNIX format.
It turns out that with just a constructor, add(), remove() and poll() I can already write an echo server that handles multiple telnet sessions in parallel :-) TODO Documentation, destroy(), tests for poll()