aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorDmitry Antipov2012-07-15 11:57:54 +0400
committerDmitry Antipov2012-07-15 11:57:54 +0400
commit9730daca4425e2014ff43a3b1b205b598e63c72a (patch)
treeaa0ddedd9fab09a7a40cc8bff5a8cbf671fd9c62 /src/alloc.c
parent2e2d2a13e59e6332ea2623cfe4b3c1cd5afaed2c (diff)
downloademacs-9730daca4425e2014ff43a3b1b205b598e63c72a.tar.gz
emacs-9730daca4425e2014ff43a3b1b205b598e63c72a.zip
Use zero_vector where appropriate.
* alloc.c (zero_vector): Define as Lisp_Object. Adjust users accordingly. * lisp.h (zero_vector): New declaration. * font.c (null_vector): Remove. (syms_of_font): Remove initialization and staticpro. (font_list_entities, font_find_for_lface): Change to use zero_vector. * keymap.c (Faccessible_keymaps): Likewise.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/alloc.c b/src/alloc.c
index ac200254b8c..1df775a093b 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -2973,7 +2973,7 @@ static struct Lisp_Vector *large_vectors;
2973 2973
2974/* The only vector with 0 slots, allocated from pure space. */ 2974/* The only vector with 0 slots, allocated from pure space. */
2975 2975
2976static struct Lisp_Vector *zero_vector; 2976Lisp_Object zero_vector;
2977 2977
2978/* Get a new vector block. */ 2978/* Get a new vector block. */
2979 2979
@@ -2997,8 +2997,7 @@ allocate_vector_block (void)
2997static void 2997static void
2998init_vectors (void) 2998init_vectors (void)
2999{ 2999{
3000 zero_vector = pure_alloc (header_size, Lisp_Vectorlike); 3000 zero_vector = make_pure_vector (0);
3001 zero_vector->header.size = 0;
3002} 3001}
3003 3002
3004/* Allocate vector from a vector block. */ 3003/* Allocate vector from a vector block. */
@@ -3190,7 +3189,7 @@ allocate_vectorlike (ptrdiff_t len)
3190 /* eassert (!handling_signal); */ 3189 /* eassert (!handling_signal); */
3191 3190
3192 if (len == 0) 3191 if (len == 0)
3193 p = zero_vector; 3192 p = XVECTOR (zero_vector);
3194 else 3193 else
3195 { 3194 {
3196 size_t nbytes = header_size + len * word_size; 3195 size_t nbytes = header_size + len * word_size;