Mercurial > emacs
comparison src/buffer.c @ 27739:e272d652619a
(Fget_buffer_create, Fmake_indirect_buffer): Use
allocate_buffer instead of xmalloc.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Thu, 17 Feb 2000 15:21:58 +0000 |
parents | 90165d2202f9 |
children | fd3ece8a61e5 |
comparison
equal
deleted
inserted
replaced
27738:581c76c41ca4 | 27739:e272d652619a |
---|---|
328 return buf; | 328 return buf; |
329 | 329 |
330 if (XSTRING (name)->size == 0) | 330 if (XSTRING (name)->size == 0) |
331 error ("Empty string for buffer name is not allowed"); | 331 error ("Empty string for buffer name is not allowed"); |
332 | 332 |
333 b = (struct buffer *) xmalloc (sizeof (struct buffer)); | 333 b = (struct buffer *) allocate_buffer (); |
334 | 334 |
335 b->size = sizeof (struct buffer) / sizeof (EMACS_INT); | 335 b->size = sizeof (struct buffer) / sizeof (EMACS_INT); |
336 | 336 |
337 /* An ordinary buffer uses its own struct buffer_text. */ | 337 /* An ordinary buffer uses its own struct buffer_text. */ |
338 b->text = &b->own_text; | 338 b->text = &b->own_text; |
425 XSTRING (XBUFFER (base_buffer)->name)->data); | 425 XSTRING (XBUFFER (base_buffer)->name)->data); |
426 | 426 |
427 if (XSTRING (name)->size == 0) | 427 if (XSTRING (name)->size == 0) |
428 error ("Empty string for buffer name is not allowed"); | 428 error ("Empty string for buffer name is not allowed"); |
429 | 429 |
430 b = (struct buffer *) xmalloc (sizeof (struct buffer)); | 430 b = (struct buffer *) allocate_buffer (); |
431 | |
432 b->size = sizeof (struct buffer) / sizeof (EMACS_INT); | 431 b->size = sizeof (struct buffer) / sizeof (EMACS_INT); |
433 | 432 |
434 if (XBUFFER (base_buffer)->base_buffer) | 433 if (XBUFFER (base_buffer)->base_buffer) |
435 b->base_buffer = XBUFFER (base_buffer)->base_buffer; | 434 b->base_buffer = XBUFFER (base_buffer)->base_buffer; |
436 else | 435 else |