]> git.eshelyaron.com Git - emacs.git/commitdiff
* buffer.h (PTR_BYTE_POS): Don't assume a byte count fits in 'unsigned'.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 9 Jun 2011 01:10:27 +0000 (18:10 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 9 Jun 2011 01:10:27 +0000 (18:10 -0700)
src/ChangeLog
src/buffer.h

index 1929638a44249c2b38061209a09e37f5a165f142..f3ed5f66161439191ca6515c82996c5aee47a278 100644 (file)
@@ -1,5 +1,7 @@
 2011-06-09  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * buffer.h (PTR_BYTE_POS): Don't assume a byte count fits in 'unsigned'.
+
        * buffer.c (Fgenerate_new_buffer_name): Use EMACS_INT for count, not int.
        (advance_to_char_boundary): Return EMACS_INT, not int.
 
index 3c91bdfe57059a2b1ef96108f4d231851fc39ac8..ba48a8105a2b285b2bcf6974825b5e20bfdd1e10 100644 (file)
@@ -337,7 +337,7 @@ while (0)
 
 #define PTR_BYTE_POS(ptr) \
 ((ptr) - (current_buffer)->text->beg                                       \
- - (ptr - (current_buffer)->text->beg <= (unsigned) (GPT_BYTE - BEG_BYTE) ? 0 : GAP_SIZE) \
+ - (ptr - (current_buffer)->text->beg <= (size_t) (GPT_BYTE - BEG_BYTE) ? 0 : GAP_SIZE)                                                        \
  + BEG_BYTE)
 
 /* Return character at byte position POS.  */