Mercurial > hg > octave-nkf > gnulib-hg
changeset 17895:5aab9ce8ce71
diffseq: prefer ptrdiff_t to ssize_t
* lib/diffseq.h: In commentary, prefer ptrdiff_t to ssize_t.
ptrdiff_t is the natural type for signed indexes.
On a few older platforms, ssize_t is narrower than size_t.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Sat, 07 Feb 2015 18:02:42 -0800 |
parents | bfac2afaac8b |
children | 29ead46d1cca |
files | ChangeLog lib/diffseq.h |
diffstat | 2 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2015-02-07 Paul Eggert <eggert@cs.ucla.edu> + diffseq: prefer ptrdiff_t to ssize_t + * lib/diffseq.h: In commentary, prefer ptrdiff_t to ssize_t. + ptrdiff_t is the natural type for signed indexes. + On a few older platforms, ssize_t is narrower than size_t. + xalloc: fix typo that suppressed warnings * lib/xalloc.h: Add missing _GL_INLINE_HEADER_END. This typo, introduced a couple of years ago, mistakenly suppressed
--- a/lib/diffseq.h +++ b/lib/diffseq.h @@ -41,8 +41,8 @@ EQUAL A two-argument macro that tests two elements for equality. OFFSET A signed integer type sufficient to hold the - difference between two indices. Usually - something like ssize_t. + difference between two indices. Usually + something like ptrdiff_t. EXTRA_CONTEXT_FIELDS Declarations of fields for 'struct context'. NOTE_DELETE(ctxt, xoff) Record the removal of the object xvec[xoff]. NOTE_INSERT(ctxt, yoff) Record the insertion of the object yvec[yoff].