From: Paul Eggert Date: Sun, 8 Feb 2015 02:02:42 +0000 (-0800) Subject: diffseq: prefer ptrdiff_t to ssize_t X-Git-Tag: v1.0~7163 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=59ebba1d813f624a0bd0a97450a940c289c9e9c4;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 774903ece9..3207028f67 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2015-02-07 Paul Eggert + 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 diff --git a/lib/diffseq.h b/lib/diffseq.h index b4188300c0..a4f389adca 100644 --- 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].