Mercurial > emacs
comparison src/print.c @ 56455:66c2afb52fc1
(print_preprocess): Test for print_depth at limit
before entering in being_printed.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 17 Jul 2004 14:54:56 +0000 |
parents | 745575295194 |
children | 7dd13ac27ed7 3864ee1088e9 b9eee0a7bef5 |
comparison
equal
deleted
inserted
replaced
56454:1e0c70660fff | 56455:66c2afb52fc1 |
---|---|
1282 int i; | 1282 int i; |
1283 EMACS_INT size; | 1283 EMACS_INT size; |
1284 int loop_count = 0; | 1284 int loop_count = 0; |
1285 Lisp_Object halftail; | 1285 Lisp_Object halftail; |
1286 | 1286 |
1287 /* Give up if we go so deep that print_object will get an error. */ | |
1288 /* See similar code in print_object. */ | |
1289 if (print_depth >= PRINT_CIRCLE) | |
1290 return; | |
1291 | |
1287 /* Avoid infinite recursion for circular nested structure | 1292 /* Avoid infinite recursion for circular nested structure |
1288 in the case where Vprint_circle is nil. */ | 1293 in the case where Vprint_circle is nil. */ |
1289 if (NILP (Vprint_circle)) | 1294 if (NILP (Vprint_circle)) |
1290 { | 1295 { |
1291 for (i = 0; i < print_depth; i++) | 1296 for (i = 0; i < print_depth; i++) |
1292 if (EQ (obj, being_printed[i])) | 1297 if (EQ (obj, being_printed[i])) |
1293 return; | 1298 return; |
1294 being_printed[print_depth] = obj; | 1299 being_printed[print_depth] = obj; |
1295 } | 1300 } |
1296 | |
1297 /* Give up if we go so deep that print_object will get an error. */ | |
1298 /* See similar code in print_object. */ | |
1299 if (print_depth >= PRINT_CIRCLE) | |
1300 return; | |
1301 | 1301 |
1302 print_depth++; | 1302 print_depth++; |
1303 halftail = obj; | 1303 halftail = obj; |
1304 | 1304 |
1305 loop: | 1305 loop: |