Branch: Tag:

2020-06-07

2020-06-07 14:03:39 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Stdio.Buffer: Reduce run-time argument strictness in _search().

Searching for values that aren't possible isn't an error,
so avoid the precompiler generating errors for such parameters.

Fixes testsuite failure searching for character -1.

1874:    }       /*! @decl protected int(-1..) _search(int(8bit) character, int|void start, @ -  *! int|void end) +  *! int(0..)|void end)    *!    *! Search forward from the indicated @[start] position for the specified    *! @[character].
1899:    *! @seealso    *! @[read_cstring()], @[search()], @[lfun::_search()]    */ -  PIKEFUN int _search(int(8bit) character, int|void start, int|void end) +  PIKEFUN int(-1..) _search(int character, int|void start, int|void end)    flags ID_PROTECTED; -  +  rawtype tFunc(tInt8bit tOr(tInt, tVoid) tOr(tIntPos, tVoid), +  tOr(tInt_10, tIntPos));    {    Buffer *io = THIS;    unsigned char *buf = io_read_pointer(io);