aboutsummaryrefslogtreecommitdiffstats
path: root/src/print.c
diff options
context:
space:
mode:
authorChong Yidong2005-12-17 15:55:29 +0000
committerChong Yidong2005-12-17 15:55:29 +0000
commit6b8dfbf78ad1465947111f85ef2cca792fd39a9f (patch)
tree3899170f55f0a7f2d9978f213893a067413ab7a7 /src/print.c
parent04df9646f2cc5a6c4a9b5e1e071cbd69c50e6dde (diff)
downloademacs-6b8dfbf78ad1465947111f85ef2cca792fd39a9f.tar.gz
emacs-6b8dfbf78ad1465947111f85ef2cca792fd39a9f.zip
2005-12-17 Chong Yidong <cyd@stupidchicken.com>
* print.c (print_preprocess): Just signal an error if print_depth is exceeded.
Diffstat (limited to 'src/print.c')
-rw-r--r--src/print.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/print.c b/src/print.c
index ed6b402763a..20c359f9b69 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1313,14 +1313,8 @@ print_preprocess (obj)
1313 1313
1314 /* Give up if we go so deep that print_object will get an error. */ 1314 /* Give up if we go so deep that print_object will get an error. */
1315 /* See similar code in print_object. */ 1315 /* See similar code in print_object. */
1316 /* Because print_preprocess "follows" nested lists in a slightly 1316 if (print_depth >= PRINT_CIRCLE)
1317 different order from print_object, there is a risk of giving up 1317 error ("Apparently circular structure being printed");
1318 too soon. In that case, a deeply nested circular list may cause
1319 print_object to loop. Using 3 * PRINT_CIRCLE should make this
1320 possibility negligible, but at some point someone will have to
1321 sit down and do a more careful analysis. -- cyd */
1322 if (print_depth >= 3 * PRINT_CIRCLE)
1323 return;
1324 1318
1325 /* Avoid infinite recursion for circular nested structure 1319 /* Avoid infinite recursion for circular nested structure
1326 in the case where Vprint_circle is nil. */ 1320 in the case where Vprint_circle is nil. */