diff options
| author | Paul Eggert | 2019-03-19 12:37:13 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-03-19 12:37:36 -0700 |
| commit | 53914a10558a0a579bb30d95da93d677901bc4a9 (patch) | |
| tree | 7fc6c0c091b7d380fbfc9b7411b3b646eed59fde /src/thread.c | |
| parent | 3ed1621d843e057ad879fbed3605d32f55a065b9 (diff) | |
| download | emacs-53914a10558a0a579bb30d95da93d677901bc4a9.tar.gz emacs-53914a10558a0a579bb30d95da93d677901bc4a9.zip | |
Use ‘const’ to clarify GC marking
Add ‘const’ to make the GC marking code a bit clearer.
This can also help the compiler in some cases, I think because
GCC can now determine more often that the value of a static C
variable can be cached when its address is now converted to
‘Lisp Object const *’ before escaping.
* src/alloc.c (staticvec, mark_maybe_objects, mark_memory)
(mark_stack, staticpro, mark_object_root_visitor)
(garbage_collect_1):
* src/pdumper.c (dump_ptr_referrer, dump_emacs_reloc_to_lv)
(dump_emacs_reloc_to_emacs_ptr_raw, dump_root_visitor):
* src/lisp.h (vcopy, struct gc_root_visitor):
* src/sysdep.c (stack_overflow):
* src/thread.c (mark_one_thread):
* src/thread.h (struct thread_state):
Use pointer-to-const instead of plain pointer in some
GC-related places where either will do.
Diffstat (limited to 'src/thread.c')
| -rw-r--r-- | src/thread.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread.c b/src/thread.c index 33d113295ba..59e5b6617e3 100644 --- a/src/thread.c +++ b/src/thread.c | |||
| @@ -617,7 +617,7 @@ static void | |||
| 617 | mark_one_thread (struct thread_state *thread) | 617 | mark_one_thread (struct thread_state *thread) |
| 618 | { | 618 | { |
| 619 | /* Get the stack top now, in case mark_specpdl changes it. */ | 619 | /* Get the stack top now, in case mark_specpdl changes it. */ |
| 620 | void *stack_top = thread->stack_top; | 620 | void const *stack_top = thread->stack_top; |
| 621 | 621 | ||
| 622 | mark_specpdl (thread->m_specpdl, thread->m_specpdl_ptr); | 622 | mark_specpdl (thread->m_specpdl, thread->m_specpdl_ptr); |
| 623 | 623 | ||