]> git.eshelyaron.com Git - emacs.git/commitdiff
Use ALLOCATE_PSEUDOVECTOR.
authorTom Tromey <tromey@redhat.com>
Fri, 2 Oct 2009 04:47:30 +0000 (06:47 +0200)
committerGiuseppe Scrivano <gscrivano@gnu.org>
Fri, 2 Oct 2009 04:47:30 +0000 (06:47 +0200)
Restore an initialization in search.c.
(Still doesn't build.)

src/search.c
src/thread.c
src/thread.h

index 5f74a8fffad8a2d3a31029cad11f2faa244fe71f..bcebca7e572b3f12285e5dc32d2a60d9d4617a70 100644 (file)
@@ -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.
index 2aa589e679ad7a79afbed60e1000e422c55c761a..2a3199b70b9fb20c9cee1e0a75a6a2c4d8587068 100644 (file)
@@ -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));
index fcc42773238373aa4661946f62c42b5d29e337dc..556fad2f200bc51eb71f8100a232d561029f753a 100644 (file)
@@ -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)