aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorPaul Eggert2019-07-23 11:18:16 -0700
committerPaul Eggert2019-07-23 11:18:58 -0700
commita48726ebae2f44ed15b97cb72bc7eca199d8de47 (patch)
tree169d78ee718c9e8617df4de4175e0d82056f863f /src/alloc.c
parent3479ec7332a474b3400cbc6b681c2a1f5637db94 (diff)
downloademacs-a48726ebae2f44ed15b97cb72bc7eca199d8de47.tar.gz
emacs-a48726ebae2f44ed15b97cb72bc7eca199d8de47.zip
Merge pdumper.c and alloc.c builtin symbol tests
* src/alloc.c (c_symbol_p): Move from here ... * src/lisp.h (c_symbol_p): ... to here, and make it more portable to hypothetical platforms where pointers are wider than ptrdiff_t. * src/pdumper.c (dump_builtin_symbol_p): Use c_symbol_p.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/alloc.c b/src/alloc.c
index f256ff71b07..c17bdb719a9 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -4964,15 +4964,6 @@ flush_stack_call_func (void (*func) (void *arg), void *arg)
4964 eassert (current_thread == self); 4964 eassert (current_thread == self);
4965} 4965}
4966 4966
4967static bool
4968c_symbol_p (struct Lisp_Symbol *sym)
4969{
4970 char *lispsym_ptr = (char *) lispsym;
4971 char *sym_ptr = (char *) sym;
4972 ptrdiff_t lispsym_offset = sym_ptr - lispsym_ptr;
4973 return 0 <= lispsym_offset && lispsym_offset < sizeof lispsym;
4974}
4975
4976/* Determine whether it is safe to access memory at address P. */ 4967/* Determine whether it is safe to access memory at address P. */
4977static int 4968static int
4978valid_pointer_p (void *p) 4969valid_pointer_p (void *p)