feature/igc3 89619f37626 2/5: Don't define Weak_Key_Strong_Value if USE_EPHEMERON_POOL

Helmut Eller <[email protected]>
Newsgroups gmane.emacs.diffs
Message-ID <[email protected]>
branch: feature/igc3
commit 89619f3762646662c8c8da9d3cc645c9ff3787a8
Author: Helmut Eller <[email protected]>
Commit: Helmut Eller <[email protected]>

    Don't define Weak_Key_Strong_Value if USE_EPHEMERON_POOL
    
    * src/lisp.h (enum hash_table_weakness_t): Define Weak_Key_Strong_Value
    only if !defined USE_EPHEMERON_POOL.
    * src/fns.c (hash_table_weakness_symbol): Add ifdefs for
    Weak_Key_Strong_Value.
    * src/igc.c (Vigc__dependency_replacements): Define it only
    if  if !defined USE_EPHEMERON_POOL.
---
 src/fns.c  | 2 ++
 src/igc.c  | 2 ++
 src/lisp.h | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/src/fns.c b/src/fns.c
index 81716de9f48..2d6ffe333fd 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -6596,9 +6596,11 @@ hash_table_weakness_symbol (hash_table_weakness_t weak)
     case Weak_Value:         return Qvalue;
     case Weak_Key_And_Value: return Qkey_and_value;
     case Weak_Key_Or_Value:  return Qkey_or_value;
+#if defined HAVE_MPS && !defined USE_EPHEMERON_POOL
     case Weak_Key_Strong_Value:
       /* shouldn't happen */
       return intern ("key-strong-value");
+#endif
     }
   emacs_abort ();
 }
diff --git a/src/igc.c b/src/igc.c
index df678e4b2f9..6a4c5f225fb 100644
--- a/src/igc.c
+++ b/src/igc.c
@@ -6701,9 +6701,11 @@ were the default value.  */);
      doc: /* Whether to balance buffer intervals when idle.  */);
   igc__balance_intervals = false;
 
+#ifndef USE_EPHEMERON_POOL
   DEFVAR_LISP ("igc--dependency-replacements", Vigc__dependency_replacements,
      doc: /* Internal use only.  */);
   Vigc__dependency_replacements
     = make_hash_table (&hashtest_eq, DEFAULT_HASH_SIZE,
 		       Weak_Key_Strong_Value);
+#endif
 }
diff --git a/src/lisp.h b/src/lisp.h
index b00ac52878d..d90faacf429 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2656,7 +2656,9 @@ typedef enum hash_table_weakness_t {
   Weak_Key_And_Value,	 /* References to key and value are weak:
 			    element kept as long as strong references to
 			    both key and value remain.  */
+#if defined HAVE_MPS && !defined USE_EPHEMERON_POOL
   Weak_Key_Strong_Value,
+#endif
 } hash_table_weakness_t;
 
 /* The type of a hash table index, both for table indices and index
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.