[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: editfns.c (Fformat): fix for segfault
From: |
Richard Stallman |
Subject: |
Re: editfns.c (Fformat): fix for segfault |
Date: |
Sun, 04 May 2003 09:04:27 -0400 |
Does this solve the problem?
*** print.c.~1.185.~ Fri Mar 14 16:00:39 2003
--- print.c Sat May 3 18:09:00 2003
***************
*** 759,772 ****
{
PRINTDECLARE;
Lisp_Object printcharfun;
! struct gcpro gcpro1, gcpro2;
! Lisp_Object tem;
/* Save and restore this--we are altering a buffer
but we don't want to deactivate the mark just for that.
No need for specbind, since errors deactivate the mark. */
! tem = Vdeactivate_mark;
! GCPRO2 (object, tem);
printcharfun = Vprin1_to_string_buffer;
PRINTPREPARE;
--- 759,776 ----
{
PRINTDECLARE;
Lisp_Object printcharfun;
! /* struct gcpro gcpro1, gcpro2; */
! Lisp_Object save_deactivate_mark;
! int count = specpdl_ptr - specpdl;
!
! specbind (Qinhibit_modification_hooks, Qt);
/* Save and restore this--we are altering a buffer
but we don't want to deactivate the mark just for that.
No need for specbind, since errors deactivate the mark. */
! save_deactivate_mark = Vdeactivate_mark;
! /* GCPRO2 (object, save_deactivate_mark); */
! abort_on_gc++;
printcharfun = Vprin1_to_string_buffer;
PRINTPREPARE;
***************
*** 781,790 ****
Ferase_buffer ();
set_buffer_internal (old);
! Vdeactivate_mark = tem;
! UNGCPRO;
! return object;
}
DEFUN ("princ", Fprinc, Sprinc, 1, 2, 0,
--- 785,795 ----
Ferase_buffer ();
set_buffer_internal (old);
! Vdeactivate_mark = save_deactivate_mark;
! /* UNGCPRO; */
! abort_on_gc--;
! return unbind_to (count, object);
}
DEFUN ("princ", Fprinc, Sprinc, 1, 2, 0,