diff options
| author | Paul Eggert | 2011-06-09 12:03:59 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-06-09 12:03:59 -0700 |
| commit | 55daad71c7427e6ce811fa70f2ccdaf630e235e1 (patch) | |
| tree | b99f7b49441ab620376c2f5e4dd3ed2da0130879 /src/buffer.h | |
| parent | 41cb286c61f5b5b317bf4038ff0cd43dafd9a21b (diff) | |
| download | emacs-55daad71c7427e6ce811fa70f2ccdaf630e235e1.tar.gz 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.h | 4 |
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) | |||
| 337 | 337 | ||
| 338 | #define PTR_BYTE_POS(ptr) \ | 338 | #define PTR_BYTE_POS(ptr) \ |
| 339 | ((ptr) - (current_buffer)->text->beg \ | 339 | ((ptr) - (current_buffer)->text->beg \ |
| 340 | - (ptr - (current_buffer)->text->beg <= (size_t) (GPT_BYTE - BEG_BYTE) ? 0 : GAP_SIZE) \ | 340 | - (ptr - (current_buffer)->text->beg <= GPT_BYTE - BEG_BYTE ? 0 : GAP_SIZE) \ |
| 341 | + BEG_BYTE) | 341 | + BEG_BYTE) |
| 342 | 342 | ||
| 343 | /* Return character at byte position POS. */ | 343 | /* Return character at byte position POS. */ |
| @@ -396,7 +396,7 @@ extern unsigned char *_fetch_multibyte_char_p; | |||
| 396 | 396 | ||
| 397 | #define BUF_PTR_BYTE_POS(buf, ptr) \ | 397 | #define BUF_PTR_BYTE_POS(buf, ptr) \ |
| 398 | ((ptr) - (buf)->text->beg \ | 398 | ((ptr) - (buf)->text->beg \ |
| 399 | - (ptr - (buf)->text->beg <= (unsigned) (BUF_GPT_BYTE ((buf)) - BEG_BYTE)\ | 399 | - (ptr - (buf)->text->beg <= BUF_GPT_BYTE (buf) - BEG_BYTE \ |
| 400 | ? 0 : BUF_GAP_SIZE ((buf))) \ | 400 | ? 0 : BUF_GAP_SIZE ((buf))) \ |
| 401 | + BEG_BYTE) | 401 | + BEG_BYTE) |
| 402 | 402 | ||