Commit 7bc26fdb authored by Paul Eggert's avatar Paul Eggert
Browse files

* alloc.c (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if

! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
needed otherwise.
(CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
(GC_STRING_CHARS): Remove; not used.
parent dff45157
......@@ -5,6 +5,11 @@
Rename locals to avoid shadowing.
(mark_stack): Move local variables into the #ifdef region where
they're used.
(BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
needed otherwise.
(CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
(GC_STRING_CHARS): Remove; not used.
 
* lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
avoids undefined behavior in theory.
......@@ -92,7 +92,8 @@ extern __malloc_size_t __malloc_extra_blocks;
#endif /* not DOUG_LEA_MALLOC */
#if ! defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD)
#if ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT
#ifdef HAVE_GTK_AND_PTHREAD
/* When GTK uses the file chooser dialog, different backends can be loaded
dynamically. One such a backend is the Gnome VFS backend that gets loaded
......@@ -130,12 +131,13 @@ static pthread_mutex_t alloc_mutex;
} \
while (0)
#else /* SYSTEM_MALLOC || not HAVE_GTK_AND_PTHREAD */
#else /* ! defined HAVE_GTK_AND_PTHREAD */
#define BLOCK_INPUT_ALLOC BLOCK_INPUT
#define UNBLOCK_INPUT_ALLOC UNBLOCK_INPUT
#endif /* SYSTEM_MALLOC || not HAVE_GTK_AND_PTHREAD */
#endif /* ! defined HAVE_GTK_AND_PTHREAD */
#endif /* ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT */
/* Value of _bytes_used, when spare_memory was freed. */
......@@ -152,13 +154,11 @@ static __malloc_size_t bytes_used_when_full;
#define VECTOR_UNMARK(V) ((V)->size &= ~ARRAY_MARK_FLAG)
#define VECTOR_MARKED_P(V) (((V)->size & ARRAY_MARK_FLAG) != 0)
/* Value is the number of bytes/chars of S, a pointer to a struct
Lisp_String. This must be used instead of STRING_BYTES (S) or
S->size during GC, because S->size contains the mark bit for
/* Value is the number of bytes of S, a pointer to a struct Lisp_String.
Be careful during GC, because S->size contains the mark bit for
strings. */
#define GC_STRING_BYTES(S) (STRING_BYTES (S))
#define GC_STRING_CHARS(S) ((S)->size & ~ARRAY_MARK_FLAG)
/* Global variables. */
struct emacs_globals globals;
......@@ -5306,7 +5306,6 @@ mark_object (Lisp_Object arg)
#else /* not GC_CHECK_MARKED_OBJECTS */
#define CHECK_ALLOCATED() (void) 0
#define CHECK_LIVE(LIVEP) (void) 0
#define CHECK_ALLOCATED_AND_LIVE(LIVEP) (void) 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment