diff options
| author | Chong Yidong | 2005-12-14 20:49:46 +0000 |
|---|---|---|
| committer | Chong Yidong | 2005-12-14 20:49:46 +0000 |
| commit | 9b98e161251e6d57205ff95ea19c2f07737f80da (patch) | |
| tree | 036c919b99b84711e2fc4881ef4863be83a6ab1b /src | |
| parent | c94dca60212b9586a723dd293a02553adf052b75 (diff) | |
| download | emacs-9b98e161251e6d57205ff95ea19c2f07737f80da.tar.gz emacs-9b98e161251e6d57205ff95ea19c2f07737f80da.zip | |
* print.c (print_preprocess): Go to a deeper print_depth to avoid
print_object loop.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/print.c | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 90d782faa20..b26416b7839 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,7 +1,13 @@ | |||
| 1 | 2005-12-14 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * print.c (print_preprocess): Go to a deeper print_depth to avoid | ||
| 4 | print_object loop. | ||
| 5 | |||
| 1 | 2005-12-14 Kyotaro HORIGUCHI <horiguti@meadowy.org> (tiny change) | 6 | 2005-12-14 Kyotaro HORIGUCHI <horiguti@meadowy.org> (tiny change) |
| 2 | 7 | ||
| 3 | * coding.c (code_convert_region_unwind): GCPRO arg. | 8 | * coding.c (code_convert_region_unwind): GCPRO arg. |
| 4 | 9 | ||
| 10 | >>>>>>> 1.4762 | ||
| 5 | 2005-12-12 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 11 | 2005-12-12 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 6 | 12 | ||
| 7 | * xfns.c (compute_tip_xy): Calculate root_y the same way as root_x, | 13 | * xfns.c (compute_tip_xy): Calculate root_y the same way as root_x, |
diff --git a/src/print.c b/src/print.c index d563580ddd3..ed6b402763a 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -1313,7 +1313,13 @@ 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 | if (print_depth >= PRINT_CIRCLE) | 1316 | /* Because print_preprocess "follows" nested lists in a slightly |
| 1317 | different order from print_object, there is a risk of giving up | ||
| 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) | ||
| 1317 | return; | 1323 | return; |
| 1318 | 1324 | ||
| 1319 | /* Avoid infinite recursion for circular nested structure | 1325 | /* Avoid infinite recursion for circular nested structure |