Bug#824840: libhunspell api change after upgrade to 1.4
forwarded 824840 https://github.com/hunspell/hunspell/issues/387
retitle 824840 get_wordchars_utf16 documentation wrong in hunspell(3) after API change
found 824840 1.4.0~git20160415-1
thanks
Hi,
On Fri, May 20, 2016 at 12:13:41PM +0200, Jeroen Ooms wrote:
> const std::vector<w_char>& get_wordchars_utf16() const;
>
> However 'man 3 husnpell' still lists the old API:
>
> unsigned short * get_wordchars_utf16(int *" len)
That is a bug, yeah, if it wasn't a accidential change.
AFAICS that was done in
commit 6f9e403ab758c9db9ddcebe86f237e336f4a5624
Author: Caolán McNamara <caolanm@redhat.com>
Date: Thu Apr 14 17:26:28 2016 +0100
convert ignorechars_utf16 to vector
which did
@@ -3680,9 +3675,8 @@ const char* AffixMgr::get_wordchars() const {
return wordchars;
}
-const w_char* AffixMgr::get_wordchars_utf16(int* len) const {
- *len = wordchars_utf16.size();
- return &wordchars_utf16[0];
+const std::vector<w_char>& AffixMgr::get_wordchars_utf16() const {
+ return wordchars_utf16;
}
// is there compounding?
and
- const w_char* get_wordchars_utf16(int* len) const;
+ const std::vector<w_char>& get_wordchars_utf16() const;
so it probably was intended.
> The API change was not advertised elsewhere either. It is not clear if
> the change was intended, but it breaks anything that uses this
> function.
Well, the SONAME didn't change for no reason.
If the API changed with intention so be it, and as said, the SONAME changed.
> Upstream issue: https://github.com/hunspell/hunspell/issues/387
Marking as forwarded.
Regards,
Rene
Reply to: