From b8799978aceb826fd31c4096761745be8040d9e1 Mon Sep 17 00:00:00 2001 From: Helmut Eller Date: Fri, 9 Aug 2024 11:23:42 +0200 Subject: [PATCH] Remove redundant calls to gc_init_header * igc.c (igc_make_cons, igc_alloc_symbol, igc_make_float) (igc_make_string): The header is already initialized, not need to do it again. --- src/igc.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/igc.c b/src/igc.c index 52d52ca7a91..f069a2becc9 100644 --- a/src/igc.c +++ b/src/igc.c @@ -3827,7 +3827,6 @@ igc_make_cons (Lisp_Object car, Lisp_Object cdr) struct Lisp_Cons *cons = alloc (sizeof *cons, IGC_OBJ_CONS); cons->u.s.car = car; cons->u.s.u.cdr = cdr; - gc_init_header (&cons->gc_header, IGC_OBJ_CONS); return make_lisp_ptr (cons, Lisp_Cons); } @@ -3835,7 +3834,6 @@ igc_make_cons (Lisp_Object car, Lisp_Object cdr) igc_alloc_symbol (void) { struct Lisp_Symbol *sym = alloc (sizeof *sym, IGC_OBJ_SYMBOL); - gc_init_header (&sym->gc_header, IGC_OBJ_SYMBOL); return make_lisp_symbol (sym); } @@ -3844,7 +3842,6 @@ igc_make_float (double val) { struct Lisp_Float *f = alloc (sizeof *f, IGC_OBJ_FLOAT); f->u.data = val; - gc_init_header (&f->gc_header, IGC_OBJ_FLOAT); return make_lisp_ptr (f, Lisp_Float); } @@ -3916,7 +3913,6 @@ igc_make_string (size_t nchars, size_t nbytes, bool unibyte, bool clear) s->u.s.size = nchars; s->u.s.size_byte = unibyte ? -1 : nbytes; s->u.s.data = alloc_string_data (nbytes, clear); - gc_init_header (&s->gc_header, IGC_OBJ_STRING); return make_lisp_ptr (s, Lisp_String); } -- 2.39.2