Mercurial > emacs
diff src/alloc.c @ 67494:28fd92314a04
Comment and whitespace changes.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 11 Dec 2005 05:07:16 +0000 |
parents | fc58516afccd |
children | 263a4edafafa 14a4eb789b45 7beb78bc1f8e |
line wrap: on
line diff
--- a/src/alloc.c Sun Dec 11 05:02:28 2005 +0000 +++ b/src/alloc.c Sun Dec 11 05:07:16 2005 +0000 @@ -4499,7 +4499,8 @@ /* Return 1 if OBJ is a valid lisp object. Return 0 if OBJ is NOT a valid lisp object. Return -1 if we cannot validate OBJ. -*/ + This function can be quite slow, + so it should only be used in code for manual debugging. */ int valid_lisp_object_p (obj) @@ -4525,11 +4526,11 @@ trying), so we trick the o/s to tell us whether p is a valid pointer. Unfortunately, we cannot use NULL_DEVICE here, as emacs_write may not validate p in that case. */ - if ((fd = emacs_open("__Valid__Lisp__Object__", O_CREAT | O_WRONLY | O_TRUNC, 0666)) >= 0) + if ((fd = emacs_open ("__Valid__Lisp__Object__", O_CREAT | O_WRONLY | O_TRUNC, 0666)) >= 0) { - int valid = emacs_write(fd, (char *)p, 16) == 16; - emacs_close(fd); - unlink("__Valid__Lisp__Object__"); + int valid = (emacs_write (fd, (char *)p, 16) == 16); + emacs_close (fd); + unlink ("__Valid__Lisp__Object__"); return valid; }