|
From: | Paul Eggert |
Subject: | preferring ptrdiff_t to size_t for object counts |
Date: | Sun, 4 Jun 2017 23:45:38 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 |
* They accept ptrdiff_t counts, not size_t counts. Normally sizes are computed by new functions like xwgrowalloc. When the caller computes sizes by hand, it is the caller's responsibility to check for integer overflow.
* They report errors via xwalloc_die, not xalloc_die.I've also changed the modules that GNU grep uses, as a test that this idea works on non-Emacs applications.
As this is a nontrivial change, I'll post the Gnulib patches first without installing them, for discussion.
[Prev in Thread] | Current Thread | [Next in Thread] |