On Wed, Oct 9, 2013 at 4:35 AM, Liam Healy lnp@healy.washington.dc.us wrote:
I've pushed the rewrite; please take a look and run tests to see that it's good. I've temporarily created a new branch foreign-string.
This refactorization is trickier than it might seem. You cannot pass the string to the octet-counter without performing the with-checked-simple-vector adjustments beforehand. Also, this version doesn't take into account the null terminator when computing the right bound of the buffer.
I'd start over and try to extract the encoder funcall and the null terminator loop, make sure that works, and then try to figure out what's the next lowest hanging fruit.
Cheers,