aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/buffer.c b/src/buffer.c
index a8af8a84f7f..37e520f9f5f 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -99,7 +99,7 @@ static Lisp_Object Vbuffer_local_symbols;
99/* Maximum length of an overlay vector. */ 99/* Maximum length of an overlay vector. */
100#define OVERLAY_COUNT_MAX \ 100#define OVERLAY_COUNT_MAX \
101 ((ptrdiff_t) min (MOST_POSITIVE_FIXNUM, \ 101 ((ptrdiff_t) min (MOST_POSITIVE_FIXNUM, \
102 min (PTRDIFF_MAX, SIZE_MAX) / sizeof (Lisp_Object))) 102 min (PTRDIFF_MAX, SIZE_MAX) / word_size))
103 103
104/* Flags indicating which built-in buffer-local variables 104/* Flags indicating which built-in buffer-local variables
105 are permanent locals. */ 105 are permanent locals. */
@@ -4267,7 +4267,7 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, int after,
4267 ptrdiff_t i; 4267 ptrdiff_t i;
4268 4268
4269 memcpy (copy, XVECTOR (last_overlay_modification_hooks)->contents, 4269 memcpy (copy, XVECTOR (last_overlay_modification_hooks)->contents,
4270 size * sizeof (Lisp_Object)); 4270 size * word_size);
4271 gcpro1.var = copy; 4271 gcpro1.var = copy;
4272 gcpro1.nvars = size; 4272 gcpro1.nvars = size;
4273 4273
@@ -4886,8 +4886,7 @@ init_buffer_once (void)
4886 sure that this is still correct. Otherwise, mark_vectorlike may not 4886 sure that this is still correct. Otherwise, mark_vectorlike may not
4887 trace all Lisp_Objects in buffer_defaults and buffer_local_symbols. */ 4887 trace all Lisp_Objects in buffer_defaults and buffer_local_symbols. */
4888 const int pvecsize 4888 const int pvecsize
4889 = (offsetof (struct buffer, own_text) - sizeof (struct vectorlike_header)) 4889 = (offsetof (struct buffer, own_text) - header_size) / word_size;
4890 / sizeof (Lisp_Object);
4891 4890
4892 memset (buffer_permanent_local_flags, 0, sizeof buffer_permanent_local_flags); 4891 memset (buffer_permanent_local_flags, 0, sizeof buffer_permanent_local_flags);
4893 4892
@@ -4972,7 +4971,7 @@ init_buffer_once (void)
4972 The local flag bits are in the local_var_flags slot of the buffer. */ 4971 The local flag bits are in the local_var_flags slot of the buffer. */
4973 4972
4974 /* Nothing can work if this isn't true */ 4973 /* Nothing can work if this isn't true */
4975 { verify (sizeof (EMACS_INT) == sizeof (Lisp_Object)); } 4974 { verify (sizeof (EMACS_INT) == word_size); }
4976 4975
4977 /* 0 means not a lisp var, -1 means always local, else mask */ 4976 /* 0 means not a lisp var, -1 means always local, else mask */
4978 memset (&buffer_local_flags, 0, sizeof buffer_local_flags); 4977 memset (&buffer_local_flags, 0, sizeof buffer_local_flags);