summaryrefslogtreecommitdiff
path: root/src/buffer.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-06-09 12:03:59 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-06-09 12:03:59 -0700
commit55daad71c7427e6ce811fa70f2ccdaf630e235e1 (patch)
treeb99f7b49441ab620376c2f5e4dd3ed2da0130879 /src/buffer.h
parent41cb286c61f5b5b317bf4038ff0cd43dafd9a21b (diff)
downloademacs-55daad71c7427e6ce811fa70f2ccdaf630e235e1.tar.gz
emacs-55daad71c7427e6ce811fa70f2ccdaf630e235e1.tar.bz2
emacs-55daad71c7427e6ce811fa70f2ccdaf630e235e1.zip
* buffer.h (PTR_BYTE_POS, BUF_PTR_BYTE_POS): Remove harmful cast.
The cast incorrectly truncated 64-bit byte offsets to 32 bits, and isn't needed on 32-bit machines.
Diffstat (limited to 'src/buffer.h')
-rw-r--r--src/buffer.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buffer.h b/src/buffer.h
index ba48a8105a2..725e4edb638 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -337,7 +337,7 @@ while (0)
#define PTR_BYTE_POS(ptr) \
((ptr) - (current_buffer)->text->beg \
- - (ptr - (current_buffer)->text->beg <= (size_t) (GPT_BYTE - BEG_BYTE) ? 0 : GAP_SIZE) \
+ - (ptr - (current_buffer)->text->beg <= GPT_BYTE - BEG_BYTE ? 0 : GAP_SIZE) \
+ BEG_BYTE)
/* Return character at byte position POS. */
@@ -396,7 +396,7 @@ extern unsigned char *_fetch_multibyte_char_p;
#define BUF_PTR_BYTE_POS(buf, ptr) \
((ptr) - (buf)->text->beg \
- - (ptr - (buf)->text->beg <= (unsigned) (BUF_GPT_BYTE ((buf)) - BEG_BYTE)\
+ - (ptr - (buf)->text->beg <= BUF_GPT_BYTE (buf) - BEG_BYTE \
? 0 : BUF_GAP_SIZE ((buf))) \
+ BEG_BYTE)