# HG changeset patch # User Chong Yidong # Date 1216616756 0 # Node ID 57acb523331b7d63232ad26987c7e2d868ed807c # Parent b27502af61f9e92bf1acff6f6a1513ed3bca665d (print_object): Check print_depth before searching for circularities. diff -r b27502af61f9 -r 57acb523331b src/print.c --- a/src/print.c Mon Jul 21 05:04:14 2008 +0000 +++ b/src/print.c Mon Jul 21 05:05:56 2008 +0000 @@ -1487,6 +1487,10 @@ QUIT; + /* See similar code in print_preprocess. */ + if (print_depth > PRINT_CIRCLE) + error ("Apparently circular structure being printed"); + /* Detect circularities and truncate them. */ if (STRINGP (obj) || CONSP (obj) || VECTORP (obj) || COMPILEDP (obj) || CHAR_TABLE_P (obj) @@ -1537,9 +1541,6 @@ print_depth++; - /* See similar code in print_preprocess. */ - if (print_depth > PRINT_CIRCLE) - error ("Apparently circular structure being printed"); #ifdef MAX_PRINT_CHARS if (max_print && print_chars > max_print) {