emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/print.c


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/src/print.c
Date: Wed, 14 Dec 2005 20:49:47 +0000

Index: emacs/src/print.c
diff -u emacs/src/print.c:1.214 emacs/src/print.c:1.215
--- emacs/src/print.c:1.214     Wed Nov  9 23:14:32 2005
+++ emacs/src/print.c   Wed Dec 14 20:49:46 2005
@@ -1313,7 +1313,13 @@
 
   /* Give up if we go so deep that print_object will get an error.  */
   /* See similar code in print_object.  */
-  if (print_depth >= PRINT_CIRCLE)
+  /* Because print_preprocess "follows" nested lists in a slightly
+     different order from print_object, there is a risk of giving up
+     too soon.  In that case, a deeply nested circular list may cause
+     print_object to loop.  Using 3 * PRINT_CIRCLE should make this
+     possibility negligible, but at some point someone will have to
+     sit down and do a more careful analysis. -- cyd */
+  if (print_depth >= 3 * PRINT_CIRCLE)
     return;
 
   /* Avoid infinite recursion for circular nested structure




reply via email to

[Prev in Thread] Current Thread [Next in Thread]