From: Chong Yidong Date: Mon, 21 Jul 2008 05:03:39 +0000 (+0000) Subject: (print_object): Check print_depth before searching for circularities. X-Git-Tag: emacs-pretest-23.0.90~4036 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=76afdf7e9229ae3bbffbe6cd60d2fcbb513c761b;p=emacs.git (print_object): Check print_depth before searching for circularities. --- diff --git a/src/print.c b/src/print.c index 8fac2660d0f..dc4c40aabab 100644 --- a/src/print.c +++ b/src/print.c @@ -1560,6 +1560,10 @@ print_object (obj, printcharfun, escapeflag) 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) || SUB_CHAR_TABLE_P (obj) @@ -1610,9 +1614,6 @@ print_object (obj, printcharfun, escapeflag) 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) {