Commit 8f95c75c authored by Paul Eggert's avatar Paul Eggert
Browse files

* buffer.h (PTR_BYTE_POS): Don't assume a byte count fits in 'unsigned'.

parent 0ceccced
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.
......
......@@ -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. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment