diff options
| author | Chong Yidong | 2008-07-21 05:03:39 +0000 |
|---|---|---|
| committer | Chong Yidong | 2008-07-21 05:03:39 +0000 |
| commit | 76afdf7e9229ae3bbffbe6cd60d2fcbb513c761b (patch) | |
| tree | 79784c60c7310359d1041df42933bf9deb8b3283 /src/print.c | |
| parent | b42f411561d3bbbc4cc4a0d1e5a025fd6d9e8ccb (diff) | |
| download | emacs-76afdf7e9229ae3bbffbe6cd60d2fcbb513c761b.tar.gz emacs-76afdf7e9229ae3bbffbe6cd60d2fcbb513c761b.zip | |
(print_object): Check print_depth before searching for circularities.
Diffstat (limited to 'src/print.c')
| -rw-r--r-- | src/print.c | 7 |
1 files changed, 4 insertions, 3 deletions
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) | |||
| 1560 | 1560 | ||
| 1561 | QUIT; | 1561 | QUIT; |
| 1562 | 1562 | ||
| 1563 | /* See similar code in print_preprocess. */ | ||
| 1564 | if (print_depth > PRINT_CIRCLE) | ||
| 1565 | error ("Apparently circular structure being printed"); | ||
| 1566 | |||
| 1563 | /* Detect circularities and truncate them. */ | 1567 | /* Detect circularities and truncate them. */ |
| 1564 | if (STRINGP (obj) || CONSP (obj) || VECTORP (obj) | 1568 | if (STRINGP (obj) || CONSP (obj) || VECTORP (obj) |
| 1565 | || COMPILEDP (obj) || CHAR_TABLE_P (obj) || SUB_CHAR_TABLE_P (obj) | 1569 | || COMPILEDP (obj) || CHAR_TABLE_P (obj) || SUB_CHAR_TABLE_P (obj) |
| @@ -1610,9 +1614,6 @@ print_object (obj, printcharfun, escapeflag) | |||
| 1610 | 1614 | ||
| 1611 | print_depth++; | 1615 | print_depth++; |
| 1612 | 1616 | ||
| 1613 | /* See similar code in print_preprocess. */ | ||
| 1614 | if (print_depth > PRINT_CIRCLE) | ||
| 1615 | error ("Apparently circular structure being printed"); | ||
| 1616 | #ifdef MAX_PRINT_CHARS | 1617 | #ifdef MAX_PRINT_CHARS |
| 1617 | if (max_print && print_chars > max_print) | 1618 | if (max_print && print_chars > max_print) |
| 1618 | { | 1619 | { |