diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2015-01-16 11:42:24 +0300 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2015-01-16 11:42:24 +0300 |
commit | 3b48f99542d822c0647334524035e93f4a094358 (patch) | |
tree | 8d743237c2a211fca50dee6d93cb58a11a976d68 /src/window.c | |
parent | 0ecb1eb988d25d3511e11ac39e05550cec57dc3f (diff) | |
download | emacs-3b48f99542d822c0647334524035e93f4a094358.tar.gz |
Tune pseudovector allocation assuming Qnil == 0
* alloc.c (allocate_pseudovector): Use memset for both
Lisp_Objects and regular slots. Add zerolen arg.
* lisp.h (allocate_pseudovector): Adjust prototype.
(ALLOCATE_PSEUDOVECTOR): Adjust user.
(ALLOCATE_ZEROED_PSEUDOVECTOR): New macro.
(allocate_hash_table, allocate_window, allocate_frame)
(allocate_process, allocate_terminal): Remove prototypes.
* fns.c (allocate_hash_table): Now static here.
* frame.c (allocate_frame):
* process.c (allocate_process):
* terminal.c (allocate_terminal):
* window.c (allocate_window): Now static here.
Use ALLOCATE_ZEROED_PSEUDOVECTOR. Add comment.
Diffstat (limited to 'src/window.c')
-rw-r--r-- | src/window.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/window.c b/src/window.c index e5ddef5fa40..53a235f8446 100644 --- a/src/window.c +++ b/src/window.c @@ -3642,7 +3642,16 @@ temp_output_buffer_show (register Lisp_Object buf) } } } - + +/* Allocate basically initialized window. */ + +static struct window * +allocate_window (void) +{ + return ALLOCATE_ZEROED_PSEUDOVECTOR + (struct window, current_matrix, PVEC_WINDOW); +} + /* Make new window, have it replace WINDOW in window-tree, and make WINDOW its only vertical child (HORFLAG 1 means make WINDOW its only horizontal child). */ |