[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/alloc.c
From: |
Richard M . Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/src/alloc.c |
Date: |
Sun, 11 Dec 2005 00:07:16 -0500 |
Index: emacs/src/alloc.c
diff -c emacs/src/alloc.c:1.384 emacs/src/alloc.c:1.385
*** emacs/src/alloc.c:1.384 Wed Nov 30 00:04:51 2005
--- emacs/src/alloc.c Sun Dec 11 05:07:16 2005
***************
*** 4499,4505 ****
/* 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.
! */
int
valid_lisp_object_p (obj)
--- 4499,4506 ----
/* 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,4535 ****
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)
{
! int valid = emacs_write(fd, (char *)p, 16) == 16;
! emacs_close(fd);
! unlink("__Valid__Lisp__Object__");
return valid;
}
--- 4526,4536 ----
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)
{
! int valid = (emacs_write (fd, (char *)p, 16) == 16);
! emacs_close (fd);
! unlink ("__Valid__Lisp__Object__");
return valid;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/src/alloc.c,
Richard M . Stallman <=