# HG changeset patch # User Paul Eggert # Date 1423360962 28800 # Node ID 5aab9ce8ce71eb25b625d08f5a779ae70e412295 # Parent bfac2afaac8b30d31858616adbbf1f0b3938d59e 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 --- 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 --- 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].