From 5da2d56a32a6dc8bf36df688c953be671914e534 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 2 Oct 2009 06:47:30 +0200 Subject: [PATCH] Use ALLOCATE_PSEUDOVECTOR. Restore an initialization in search.c. (Still doesn't build.) --- src/search.c | 3 +++ src/thread.c | 4 ++-- src/thread.h | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/search.c b/src/search.c index 5f74a8fffad..bcebca7e572 100644 --- a/src/search.c +++ b/src/search.c @@ -3266,6 +3266,9 @@ syms_of_search () Fput (Qinvalid_regexp, Qerror_message, build_string ("Invalid regexp")); + last_thing_searched = Qnil; + saved_last_thing_searched = Qnil; + DEFVAR_LISP ("search-spaces-regexp", &Vsearch_spaces_regexp, doc: /* Regexp to substitute for bunches of spaces in regexp search. Some commands use this for user-specified regexps. diff --git a/src/thread.c b/src/thread.c index 2aa589e679a..2a3199b70b9 100644 --- a/src/thread.c +++ b/src/thread.c @@ -333,8 +333,8 @@ does not try to get a lock on the current buffer. */) if (!initialized) abort (); - new_thread = (struct thread_state *) allocate_pseudovector (VECSIZE (struct thread_state), - 4, PVEC_THREAD); + new_thread = ALLOCATE_PSEUDOVECTOR (struct thread_state, m_gcprolist, + PVEC_THREAD); memset ((char *) new_thread + OFFSETOF (struct thread_state, m_gcprolist), 0, sizeof (struct thread_state) - OFFSETOF (struct thread_state, m_gcprolist)); diff --git a/src/thread.h b/src/thread.h index fcc42773238..556fad2f200 100644 --- a/src/thread.h +++ b/src/thread.h @@ -21,6 +21,7 @@ struct thread_state Lisp_Object m_saved_last_thing_searched; #define saved_last_thing_searched (current_thread->m_saved_last_thing_searched) + /* m_gcprolist must be the first non-lisp field. */ /* Recording what needs to be marked for gc. */ struct gcpro *m_gcprolist; #define gcprolist (current_thread->m_gcprolist) -- 2.11.4.GIT