[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
- To: openldap-its@OpenLDAP.org
- Subject: Re: (ITS#7992) lmdb: Windows: assume file paths are UTF-8, encode to UTF-16 for WinAPI and enable compiling when UNICODE is defined
- From: h.b.furuseth@usit.uio.no
- Date: Wed, 03 Feb 2016 18:31:44 +0000
- Auto-submitted: auto-generated (OpenLDAP-ITS)
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'