diff src/lisp.h @ 108161:514ebf69b289

Fix wrong-docstring problem introduced with hash-consing. * eval.c (Fautoload): Set doc to a unique number rather than to 0. Remove unused var `args'. * lisp.h (XSETCARFASTINT, XSETCDRFASTINT): Remove. (LOADHIST_ATTACH): Wrap with do...while to avoid surprises for callers. * doc.c (store_function_docstring): Use XSETCAR.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 29 Apr 2010 08:42:01 -0400
parents 4d8277a44bb4
children 261591829d04
line wrap: on
line diff
--- a/src/lisp.h	Wed Apr 28 18:27:54 2010 -0400
+++ b/src/lisp.h	Thu Apr 29 08:42:01 2010 -0400
@@ -721,11 +721,6 @@
 #define XSETCAR(c,n) (XCAR_AS_LVALUE(c) = (n))
 #define XSETCDR(c,n) (XCDR_AS_LVALUE(c) = (n))
 
-/* For performance: Fast storage of positive integers into the
-   fields of a cons cell.  See above caveats.  */
-#define XSETCARFASTINT(c,n)  XSETFASTINT(XCAR_AS_LVALUE(c),(n))
-#define XSETCDRFASTINT(c,n)  XSETFASTINT(XCDR_AS_LVALUE(c),(n))
-
 /* Take the car or cdr of something whose type is not known.  */
 #define CAR(c)					\
  (CONSP ((c)) ? XCAR ((c))			\
@@ -2821,7 +2816,9 @@
 extern Lisp_Object make_symbol P_ ((char *));
 extern Lisp_Object oblookup P_ ((Lisp_Object, const char *, int, int));
 #define LOADHIST_ATTACH(x) \
- if (initialized) Vcurrent_load_list = Fcons (x, Vcurrent_load_list)
+  do {									\
+    if (initialized) Vcurrent_load_list = Fcons (x, Vcurrent_load_list); \
+  } while (0)
 extern Lisp_Object Vcurrent_load_list;
 extern Lisp_Object Vload_history, Vload_suffixes, Vload_file_rep_suffixes;
 extern int openp P_ ((Lisp_Object, Lisp_Object, Lisp_Object,