]> Savannah Git Hosting - gnulib.git/commitdiff
diffseq: prefer ptrdiff_t to ssize_t
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 8 Feb 2015 02:02:42 +0000 (18:02 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 8 Feb 2015 02:09:52 +0000 (18:09 -0800)
* 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.

ChangeLog
lib/diffseq.h

index 774903ece95a03afadc43674ea6562f93d958c0b..3207028f67560f9808a2ce01a73c025a2039d757 100644 (file)
--- 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
index b4188300c022197cb9f4a6c471e104e912d62357..a4f389adca24f71b572d42aedf32d652d9b7f3cb 100644 (file)
@@ -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].