all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: byte-compiler fails to print complex byte-code data (SOLVED?)
@ 2004-05-18  9:11 David PONCE
  2004-05-19  1:25 ` Richard Stallman
  0 siblings, 1 reply; 3+ messages in thread
From: David PONCE @ 2004-05-18  9:11 UTC (permalink / raw)
  Cc: emacs-devel

Hi,

> On latest CVS GNU Emacs, byte compilation fails because `prin1' of
> complex byte-code data signals error "Apparently circular structure
> being printed" in `byte-compile-output-docform'.
[...]
> I suspect the problem is caused by this change:
> 
> 2004-05-10  Richard M. Stallman  <rms@gnu.org>
> 
>     * print.c (print_preprocess): Use being_printed, loop_count and
>     halftail to detect overdeep nesting and cyclic cdr chains.

I looked more thoroughly at print.c code, and found that in the print
routine, when print_preprocess has been called, with the above change
it can leave print_depth incremented, which leads to the "Apparently
circular structure being printed" error in next call to print_object.

With the following patch, that resets print_depth to 0 before to call
print_object, the byte-compiler no more fails to print large byte code
data.

WDYT?

David

2004-05-18  David Ponce  <david@dponce.com>

	* print.c (print): Reset print_depth before to call print_object.

Index: print.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/print.c,v
retrieving revision 1.202
diff -c -r1.202 print.c
*** print.c	17 May 2004 22:47:40 -0000	1.202
--- print.c	18 May 2004 08:54:07 -0000
***************
*** 1220,1226 ****
       register Lisp_Object printcharfun;
       int escapeflag;
  {
-   print_depth = 0;
    old_backquote_output = 0;
  
    /* Reset print_number_index and Vprint_number_table only when
--- 1220,1225 ----
***************
*** 1240,1245 ****
--- 1239,1245 ----
        start = index = print_number_index;
        /* Construct Vprint_number_table.
  	 This increments print_number_index for the objects added.  */
+       print_depth = 0;
        print_preprocess (obj);
  
        /* Remove unnecessary objects, which appear only once in OBJ;
***************
*** 1264,1269 ****
--- 1264,1270 ----
        print_number_index = index;
      }
  
+   print_depth = 0;
    print_object (obj, printcharfun, escapeflag);
  }

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: byte-compiler fails to print complex byte-code data (SOLVED?)
  2004-05-18  9:11 byte-compiler fails to print complex byte-code data (SOLVED?) David PONCE
@ 2004-05-19  1:25 ` Richard Stallman
  2004-05-19  7:40   ` David Ponce
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Stallman @ 2004-05-19  1:25 UTC (permalink / raw)
  Cc: emacs-devel

Thanks for fixing the bug.  If you can install this fix, please do.
Otherwise, Eli, can you install it?


2004-05-18  David Ponce  <david@dponce.com>

	* print.c (print): Reset print_depth before to call print_object.

Index: print.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/print.c,v
retrieving revision 1.202
diff -c -r1.202 print.c
*** print.c	17 May 2004 22:47:40 -0000	1.202
--- print.c	18 May 2004 08:54:07 -0000
***************
*** 1220,1226 ****
       register Lisp_Object printcharfun;
       int escapeflag;
  {
-   print_depth = 0;
    old_backquote_output = 0;
  
    /* Reset print_number_index and Vprint_number_table only when
--- 1220,1225 ----
***************
*** 1240,1245 ****
--- 1239,1245 ----
        start = index = print_number_index;
        /* Construct Vprint_number_table.
  	 This increments print_number_index for the objects added.  */
+       print_depth = 0;
        print_preprocess (obj);
  
        /* Remove unnecessary objects, which appear only once in OBJ;
***************
*** 1264,1269 ****
--- 1264,1270 ----
        print_number_index = index;
      }
  
+   print_depth = 0;
    print_object (obj, printcharfun, escapeflag);
  }

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: byte-compiler fails to print complex byte-code data (SOLVED?)
  2004-05-19  1:25 ` Richard Stallman
@ 2004-05-19  7:40   ` David Ponce
  0 siblings, 0 replies; 3+ messages in thread
From: David Ponce @ 2004-05-19  7:40 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman wrote:
> Thanks for fixing the bug.  If you can install this fix, please do.
> Otherwise, Eli, can you install it?

I installed the fix.

David

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-05-19  7:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-18  9:11 byte-compiler fails to print complex byte-code data (SOLVED?) David PONCE
2004-05-19  1:25 ` Richard Stallman
2004-05-19  7:40   ` David Ponce

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.