Mercurial > emacs
comparison src/alloc.c @ 56187:e3720731abbb
(safe_alloca_unwind): New function.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Mon, 21 Jun 2004 21:51:50 +0000 |
parents | ca648e6d2d7b |
children | db1817b88294 |
comparison
equal
deleted
inserted
replaced
56186:8107f309570c | 56187:e3720731abbb |
---|---|
574 { | 574 { |
575 size_t len = strlen (s) + 1; | 575 size_t len = strlen (s) + 1; |
576 char *p = (char *) xmalloc (len); | 576 char *p = (char *) xmalloc (len); |
577 bcopy (s, p, len); | 577 bcopy (s, p, len); |
578 return p; | 578 return p; |
579 } | |
580 | |
581 | |
582 /* Unwind for SAFE_ALLOCA */ | |
583 | |
584 Lisp_Object | |
585 safe_alloca_unwind (arg) | |
586 Lisp_Object arg; | |
587 { | |
588 xfree (XSAVE_VALUE (arg)->pointer); | |
589 return Qnil; | |
579 } | 590 } |
580 | 591 |
581 | 592 |
582 /* Like malloc but used for allocating Lisp data. NBYTES is the | 593 /* Like malloc but used for allocating Lisp data. NBYTES is the |
583 number of bytes to allocate, TYPE describes the intended use of the | 594 number of bytes to allocate, TYPE describes the intended use of the |