aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 5ab28bc0cde..5d8ccdc7b7c 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -4500,7 +4500,8 @@ mark_stack ()
4500/* Return 1 if OBJ is a valid lisp object. 4500/* Return 1 if OBJ is a valid lisp object.
4501 Return 0 if OBJ is NOT a valid lisp object. 4501 Return 0 if OBJ is NOT a valid lisp object.
4502 Return -1 if we cannot validate OBJ. 4502 Return -1 if we cannot validate OBJ.
4503*/ 4503 This function can be quite slow,
4504 so it should only be used in code for manual debugging. */
4504 4505
4505int 4506int
4506valid_lisp_object_p (obj) 4507valid_lisp_object_p (obj)
@@ -4526,11 +4527,11 @@ valid_lisp_object_p (obj)
4526 trying), so we trick the o/s to tell us whether p is a valid 4527 trying), so we trick the o/s to tell us whether p is a valid
4527 pointer. Unfortunately, we cannot use NULL_DEVICE here, as 4528 pointer. Unfortunately, we cannot use NULL_DEVICE here, as
4528 emacs_write may not validate p in that case. */ 4529 emacs_write may not validate p in that case. */
4529 if ((fd = emacs_open("__Valid__Lisp__Object__", O_CREAT | O_WRONLY | O_TRUNC, 0666)) >= 0) 4530 if ((fd = emacs_open ("__Valid__Lisp__Object__", O_CREAT | O_WRONLY | O_TRUNC, 0666)) >= 0)
4530 { 4531 {
4531 int valid = emacs_write(fd, (char *)p, 16) == 16; 4532 int valid = (emacs_write (fd, (char *)p, 16) == 16);
4532 emacs_close(fd); 4533 emacs_close (fd);
4533 unlink("__Valid__Lisp__Object__"); 4534 unlink ("__Valid__Lisp__Object__");
4534 return valid; 4535 return valid;
4535 } 4536 }
4536 4537