ev_set_allocator takes signed size
Samuel Williams
space.ship.traveller at gmail.com
Sat Mar 23 02:36:56 CET 2019
Thanks Marc.
Do you think it makes sense to match the POSIX definition of `realloc`?
http://pubs.opengroup.org/onlinepubs/9699919799/
I tested it locally and it seems okay. I know that's just one data point.
Kind regards
Samuel
On Tue, 19 Mar 2019 at 07:01, Marc Lehmann <schmorp at schmorp.de> wrote:
> On Mon, Mar 18, 2019 at 11:28:11AM +1300, Samuel Williams <
> space.ship.traveller at gmail.com> wrote:
> > Is there some reason why ev_set_allocator is defined as:
>
> If I remember correctly, this was because size_t and ssize_t were not very
> portable.
>
> > Because this produces warnings when trying to use `realloc` style
> > functions, defined as:
>
> Well, "relloc style functions" is a rather fuzzy set - if you limit
> yourself to realloc functions only, then this is probably a good thing,
> as the semantic of a large number of realloc functions is not of the
> required type, so you probably need a wrapper in any case to work around
> incompatibilities (for example, libev itself uses such a wrapper by
> default, called ev_realloc_emul).
>
> --
> The choice of a Deliantra, the free code+content
> MORPG
> -----==- _GNU_ http://www.deliantra.net
> ----==-- _ generation
> ---==---(_)__ __ ____ __ Marc Lehmann
> --==---/ / _ \/ // /\ \/ / schmorp at schmorp.de
> -=====/_/_//_/\_,_/ /_/\_\
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schmorp.de/pipermail/libev/attachments/20190323/2600cd82/attachment.html>
More information about the libev
mailing list