/[emacs]/emacs/src/alloc.c
ViewVC logotype

Diff of /emacs/src/alloc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.272.2.9 by miles, Tue Jul 6 09:31:27 2004 UTC revision 1.272.2.10 by miles, Tue Jul 6 10:20:19 2004 UTC
# Line 579  xstrdup (s) Line 579  xstrdup (s)
579  }  }
580    
581    
582    /* Unwind for SAFE_ALLOCA */
583    
584    Lisp_Object
585    safe_alloca_unwind (arg)
586         Lisp_Object arg;
587    {
588      register struct Lisp_Save_Value *p = XSAVE_VALUE (arg);
589    
590      p->dogc = 0;
591      xfree (p->pointer);
592      p->pointer = 0;
593      return Qnil;
594    }
595    
596    
597  /* Like malloc but used for allocating Lisp data.  NBYTES is the  /* Like malloc but used for allocating Lisp data.  NBYTES is the
598     number of bytes to allocate, TYPE describes the intended use of the     number of bytes to allocate, TYPE describes the intended use of the
599     allcated memory block (for strings, for conses, ...).  */     allcated memory block (for strings, for conses, ...).  */
# Line 2935  make_save_value (pointer, integer) Line 2950  make_save_value (pointer, integer)
2950    p = XSAVE_VALUE (val);    p = XSAVE_VALUE (val);
2951    p->pointer = pointer;    p->pointer = pointer;
2952    p->integer = integer;    p->integer = integer;
2953      p->dogc = 0;
2954    return val;    return val;
2955  }  }
2956    
# Line 4968  mark_object (arg) Line 4984  mark_object (arg)
4984        if (XMARKER (obj)->gcmarkbit)        if (XMARKER (obj)->gcmarkbit)
4985          break;          break;
4986        XMARKER (obj)->gcmarkbit = 1;        XMARKER (obj)->gcmarkbit = 1;
4987    
4988        switch (XMISCTYPE (obj))        switch (XMISCTYPE (obj))
4989          {          {
4990          case Lisp_Misc_Buffer_Local_Value:          case Lisp_Misc_Buffer_Local_Value:
# Line 4992  mark_object (arg) Line 5009  mark_object (arg)
5009            /* DO NOT mark thru the marker's chain.            /* DO NOT mark thru the marker's chain.
5010               The buffer's markers chain does not preserve markers from gc;               The buffer's markers chain does not preserve markers from gc;
5011               instead, markers are removed from the chain when freed by gc.  */               instead, markers are removed from the chain when freed by gc.  */
5012              break;
5013    
5014          case Lisp_Misc_Intfwd:          case Lisp_Misc_Intfwd:
5015          case Lisp_Misc_Boolfwd:          case Lisp_Misc_Boolfwd:
5016          case Lisp_Misc_Objfwd:          case Lisp_Misc_Objfwd:
# Line 5001  mark_object (arg) Line 5020  mark_object (arg)
5020               since all markable slots in current buffer marked anyway.  */               since all markable slots in current buffer marked anyway.  */
5021            /* Don't need to do Lisp_Objfwd, since the places they point            /* Don't need to do Lisp_Objfwd, since the places they point
5022               are protected with staticpro.  */               are protected with staticpro.  */
5023              break;
5024    
5025          case Lisp_Misc_Save_Value:          case Lisp_Misc_Save_Value:
5026              {
5027                register struct Lisp_Save_Value *ptr = XSAVE_VALUE (obj);
5028                /* If DOGC is set, POINTER is the address of a memory
5029                   area containing INTEGER potential Lisp_Objects.  */
5030                if (ptr->dogc)
5031                  {
5032                    Lisp_Object *p = (Lisp_Object *) ptr->pointer;
5033                    int nelt;
5034                    for (nelt = ptr->integer; nelt > 0; nelt--, p++)
5035                      mark_maybe_object (*p);
5036                  }
5037              }
5038            break;            break;
5039    
5040          case Lisp_Misc_Overlay:          case Lisp_Misc_Overlay:

Legend:
Removed from v.1.272.2.9  
changed lines
  Added in v.1.272.2.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26