[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#7992) lmdb: Windows: assume file paths are UTF-8, encode to UTF-16 for WinAPI and enable compiling when UNICODE is defined



On 03/02/16 01:39, h.b.furuseth@usit.uio.no wrote:
> This is still not fixed: The EILSEQ, and a new memleak.
> I rewrote it in my branch "mdb/its7992".  Untested.

Oops, shouldn't have done some late-night code and forgotten
to comment it. The important changes are:
* "goto leave" - fixes a memleak on failure.
* New error code for mdb_strerror(), since EILSEQ is an errno.

The rest is just twiddling around:
* Drop the always-unused size params to utf8_to_utf16().
* goto fail -- just cleanup, fewer exit points from function.
* Looping adds an error check and saves a few bytes object code:-)
* Move function inside Doxygen group 'internal'