]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Rename AssertVariableIsOfType to StaticAssertVariableIsOfType
authorPeter Eisentraut <peter@eisentraut.org>
Tue, 3 Feb 2026 07:36:47 +0000 (08:36 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Tue, 3 Feb 2026 07:45:24 +0000 (08:45 +0100)
This keeps run-time assertions and static assertions clearly separate.

Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/2273bc2a-045d-4a75-8584-7cd9396e5534%40eisentraut.org

14 files changed:
contrib/hstore_plperl/hstore_plperl.c
contrib/hstore_plpython/hstore_plpython.c
contrib/jsonb_plpython/jsonb_plpython.c
contrib/ltree_plpython/ltree_plpython.c
src/backend/executor/execParallel.c
src/backend/jit/llvm/llvmjit_types.c
src/include/access/xlogdefs.h
src/include/c.h
src/include/lib/ilist.h
src/include/lib/pairingheap.h
src/include/postgres.h
src/include/storage/proclist.h
src/include/utils/freepage.h
src/include/utils/relptr.h

index 31393b4fa504d3d2e5c0bd9f0d14d8540d590c1c..1380a1b4367c7922c54e685b24845a41bfacb612 100644 (file)
@@ -28,24 +28,24 @@ static hstoreCheckValLen_t hstoreCheckValLen_p;
 void
 _PG_init(void)
 {
-       /* Asserts verify that typedefs above match original declarations */
-       AssertVariableIsOfType(&hstoreUpgrade, hstoreUpgrade_t);
+       /* Static asserts verify that typedefs above match original declarations */
+       StaticAssertVariableIsOfType(&hstoreUpgrade, hstoreUpgrade_t);
        hstoreUpgrade_p = (hstoreUpgrade_t)
                load_external_function("$libdir/hstore", "hstoreUpgrade",
                                                           true, NULL);
-       AssertVariableIsOfType(&hstoreUniquePairs, hstoreUniquePairs_t);
+       StaticAssertVariableIsOfType(&hstoreUniquePairs, hstoreUniquePairs_t);
        hstoreUniquePairs_p = (hstoreUniquePairs_t)
                load_external_function("$libdir/hstore", "hstoreUniquePairs",
                                                           true, NULL);
-       AssertVariableIsOfType(&hstorePairs, hstorePairs_t);
+       StaticAssertVariableIsOfType(&hstorePairs, hstorePairs_t);
        hstorePairs_p = (hstorePairs_t)
                load_external_function("$libdir/hstore", "hstorePairs",
                                                           true, NULL);
-       AssertVariableIsOfType(&hstoreCheckKeyLen, hstoreCheckKeyLen_t);
+       StaticAssertVariableIsOfType(&hstoreCheckKeyLen, hstoreCheckKeyLen_t);
        hstoreCheckKeyLen_p = (hstoreCheckKeyLen_t)
                load_external_function("$libdir/hstore", "hstoreCheckKeyLen",
                                                           true, NULL);
-       AssertVariableIsOfType(&hstoreCheckValLen, hstoreCheckValLen_t);
+       StaticAssertVariableIsOfType(&hstoreCheckValLen, hstoreCheckValLen_t);
        hstoreCheckValLen_p = (hstoreCheckValLen_t)
                load_external_function("$libdir/hstore", "hstoreCheckValLen",
                                                           true, NULL);
index e2bfc6da38e18230cef9f62b33783786090bf5cb..3c8ada2a0dcdef11868f4b38df6511e286f46939 100644 (file)
@@ -35,32 +35,32 @@ static hstoreCheckValLen_t hstoreCheckValLen_p;
 void
 _PG_init(void)
 {
-       /* Asserts verify that typedefs above match original declarations */
-       AssertVariableIsOfType(&PLyObject_AsString, PLyObject_AsString_t);
+       /* Static asserts verify that typedefs above match original declarations */
+       StaticAssertVariableIsOfType(&PLyObject_AsString, PLyObject_AsString_t);
        PLyObject_AsString_p = (PLyObject_AsString_t)
                load_external_function("$libdir/" PLPYTHON_LIBNAME, "PLyObject_AsString",
                                                           true, NULL);
-       AssertVariableIsOfType(&PLyUnicode_FromStringAndSize, PLyUnicode_FromStringAndSize_t);
+       StaticAssertVariableIsOfType(&PLyUnicode_FromStringAndSize, PLyUnicode_FromStringAndSize_t);
        PLyUnicode_FromStringAndSize_p = (PLyUnicode_FromStringAndSize_t)
                load_external_function("$libdir/" PLPYTHON_LIBNAME, "PLyUnicode_FromStringAndSize",
                                                           true, NULL);
-       AssertVariableIsOfType(&hstoreUpgrade, hstoreUpgrade_t);
+       StaticAssertVariableIsOfType(&hstoreUpgrade, hstoreUpgrade_t);
        hstoreUpgrade_p = (hstoreUpgrade_t)
                load_external_function("$libdir/hstore", "hstoreUpgrade",
                                                           true, NULL);
-       AssertVariableIsOfType(&hstoreUniquePairs, hstoreUniquePairs_t);
+       StaticAssertVariableIsOfType(&hstoreUniquePairs, hstoreUniquePairs_t);
        hstoreUniquePairs_p = (hstoreUniquePairs_t)
                load_external_function("$libdir/hstore", "hstoreUniquePairs",
                                                           true, NULL);
-       AssertVariableIsOfType(&hstorePairs, hstorePairs_t);
+       StaticAssertVariableIsOfType(&hstorePairs, hstorePairs_t);
        hstorePairs_p = (hstorePairs_t)
                load_external_function("$libdir/hstore", "hstorePairs",
                                                           true, NULL);
-       AssertVariableIsOfType(&hstoreCheckKeyLen, hstoreCheckKeyLen_t);
+       StaticAssertVariableIsOfType(&hstoreCheckKeyLen, hstoreCheckKeyLen_t);
        hstoreCheckKeyLen_p = (hstoreCheckKeyLen_t)
                load_external_function("$libdir/hstore", "hstoreCheckKeyLen",
                                                           true, NULL);
-       AssertVariableIsOfType(&hstoreCheckValLen, hstoreCheckValLen_t);
+       StaticAssertVariableIsOfType(&hstoreCheckValLen, hstoreCheckValLen_t);
        hstoreCheckValLen_p = (hstoreCheckValLen_t)
                load_external_function("$libdir/hstore", "hstoreCheckValLen",
                                                           true, NULL);
index 7e8e1d6674f6e27976f129753d9851d46ab729bb..1983bf8c30a90530607b46fdce50ada37d2fadeb 100644 (file)
@@ -39,16 +39,16 @@ static PLyUnicode_FromStringAndSize_t PLyUnicode_FromStringAndSize_p;
 void
 _PG_init(void)
 {
-       /* Asserts verify that typedefs above match original declarations */
-       AssertVariableIsOfType(&PLyObject_AsString, PLyObject_AsString_t);
+       /* Static asserts verify that typedefs above match original declarations */
+       StaticAssertVariableIsOfType(&PLyObject_AsString, PLyObject_AsString_t);
        PLyObject_AsString_p = (PLyObject_AsString_t)
                load_external_function("$libdir/" PLPYTHON_LIBNAME, "PLyObject_AsString",
                                                           true, NULL);
-       AssertVariableIsOfType(&PLyUnicode_FromStringAndSize, PLyUnicode_FromStringAndSize_t);
+       StaticAssertVariableIsOfType(&PLyUnicode_FromStringAndSize, PLyUnicode_FromStringAndSize_t);
        PLyUnicode_FromStringAndSize_p = (PLyUnicode_FromStringAndSize_t)
                load_external_function("$libdir/" PLPYTHON_LIBNAME, "PLyUnicode_FromStringAndSize",
                                                           true, NULL);
-       AssertVariableIsOfType(&PLy_elog_impl, PLy_elog_impl_t);
+       StaticAssertVariableIsOfType(&PLy_elog_impl, PLy_elog_impl_t);
        PLy_elog_impl_p = (PLy_elog_impl_t)
                load_external_function("$libdir/" PLPYTHON_LIBNAME, "PLy_elog_impl",
                                                           true, NULL);
index 0493aeb2423cc9ad6accff299b8ac4cae68b40ec..a25fb5c5fa5be4ab5d001b669676f08c9c511bc7 100644 (file)
@@ -20,8 +20,8 @@ static PLyUnicode_FromStringAndSize_t PLyUnicode_FromStringAndSize_p;
 void
 _PG_init(void)
 {
-       /* Asserts verify that typedefs above match original declarations */
-       AssertVariableIsOfType(&PLyUnicode_FromStringAndSize, PLyUnicode_FromStringAndSize_t);
+       /* Static asserts verify that typedefs above match original declarations */
+       StaticAssertVariableIsOfType(&PLyUnicode_FromStringAndSize, PLyUnicode_FromStringAndSize_t);
        PLyUnicode_FromStringAndSize_p = (PLyUnicode_FromStringAndSize_t)
                load_external_function("$libdir/" PLPYTHON_LIBNAME, "PLyUnicode_FromStringAndSize",
                                                           true, NULL);
index 772e81f31540140a3672517971526c67ea72f21b..f87978c137e7dc42444237de3ed905f81db6c1e6 100644 (file)
@@ -106,7 +106,7 @@ struct SharedExecutorInstrumentation
        /* array of num_plan_nodes * num_workers Instrumentation objects follows */
 };
 #define GetInstrumentationArray(sei) \
-       (AssertVariableIsOfTypeMacro(sei, SharedExecutorInstrumentation *), \
+       (StaticAssertVariableIsOfTypeMacro(sei, SharedExecutorInstrumentation *), \
         (Instrumentation *) (((char *) sei) + sei->instrument_offset))
 
 /* Context object for ExecParallelEstimate. */
index 4636b90cd0f8396c1e12a1ebb2a2e45967a9c032..c8a1f841293856c8f8fefa416b5960557d37c21f 100644 (file)
@@ -81,7 +81,7 @@ extern Datum AttributeTemplate(PG_FUNCTION_ARGS);
 Datum
 AttributeTemplate(PG_FUNCTION_ARGS)
 {
-       AssertVariableIsOfType(&AttributeTemplate, PGFunction);
+       StaticAssertVariableIsOfType(&AttributeTemplate, PGFunction);
 
        PG_RETURN_NULL();
 }
@@ -99,8 +99,8 @@ ExecEvalSubroutineTemplate(ExprState *state,
                                                   struct ExprEvalStep *op,
                                                   ExprContext *econtext)
 {
-       AssertVariableIsOfType(&ExecEvalSubroutineTemplate,
-                                                  ExecEvalSubroutine);
+       StaticAssertVariableIsOfType(&ExecEvalSubroutineTemplate,
+                                                                ExecEvalSubroutine);
 }
 
 extern bool ExecEvalBoolSubroutineTemplate(ExprState *state,
@@ -111,8 +111,8 @@ ExecEvalBoolSubroutineTemplate(ExprState *state,
                                                           struct ExprEvalStep *op,
                                                           ExprContext *econtext)
 {
-       AssertVariableIsOfType(&ExecEvalBoolSubroutineTemplate,
-                                                  ExecEvalBoolSubroutine);
+       StaticAssertVariableIsOfType(&ExecEvalBoolSubroutineTemplate,
+                                                                ExecEvalBoolSubroutine);
 
        return false;
 }
index f896dbe149ffbdc5ea971fb35226fa9efbcd926d..d77b894cb65074717f6e8fc2d8b1ecf67c1ea4e4 100644 (file)
@@ -44,7 +44,7 @@ typedef uint64 XLogRecPtr;
  * To avoid breaking translatable messages, we're directly applying the
  * LSN format instead of using a macro.
  */
-#define LSN_FORMAT_ARGS(lsn) (AssertVariableIsOfTypeMacro((lsn), XLogRecPtr), (uint32) ((lsn) >> 32)), ((uint32) (lsn))
+#define LSN_FORMAT_ARGS(lsn) (StaticAssertVariableIsOfTypeMacro((lsn), XLogRecPtr), (uint32) ((lsn) >> 32)), ((uint32) (lsn))
 
 /*
  * XLogSegNo - physical log file sequence number.
index c443e75b89f28cbb7810857a6da2b3ceb05f0c34..68df93ed423b8eb8795f11f379ff42d876884005 100644 (file)
@@ -955,26 +955,26 @@ pg_noreturn extern void ExceptionalCondition(const char *conditionName,
 /*
  * Compile-time checks that a variable (or expression) has the specified type.
  *
- * AssertVariableIsOfType() can be used as a statement.
- * AssertVariableIsOfTypeMacro() is intended for use in macros, eg
- *             #define foo(x) (AssertVariableIsOfTypeMacro(x, int), bar(x))
+ * StaticAssertVariableIsOfType() can be used as a statement.
+ * StaticAssertVariableIsOfTypeMacro() is intended for use in macros, eg
+ *             #define foo(x) (StaticAssertVariableIsOfTypeMacro(x, int), bar(x))
  *
  * If we don't have __builtin_types_compatible_p, we can still assert that
  * the types have the same size.  This is far from ideal (especially on 32-bit
  * platforms) but it provides at least some coverage.
  */
 #ifdef HAVE__BUILTIN_TYPES_COMPATIBLE_P
-#define AssertVariableIsOfType(varname, typename) \
+#define StaticAssertVariableIsOfType(varname, typename) \
        StaticAssertStmt(__builtin_types_compatible_p(__typeof__(varname), typename), \
        CppAsString(varname) " does not have type " CppAsString(typename))
-#define AssertVariableIsOfTypeMacro(varname, typename) \
+#define StaticAssertVariableIsOfTypeMacro(varname, typename) \
        (StaticAssertExpr(__builtin_types_compatible_p(__typeof__(varname), typename), \
         CppAsString(varname) " does not have type " CppAsString(typename)))
 #else                                                  /* !HAVE__BUILTIN_TYPES_COMPATIBLE_P */
-#define AssertVariableIsOfType(varname, typename) \
+#define StaticAssertVariableIsOfType(varname, typename) \
        StaticAssertStmt(sizeof(varname) == sizeof(typename), \
        CppAsString(varname) " does not have type " CppAsString(typename))
-#define AssertVariableIsOfTypeMacro(varname, typename) \
+#define StaticAssertVariableIsOfTypeMacro(varname, typename) \
        (StaticAssertExpr(sizeof(varname) == sizeof(typename), \
         CppAsString(varname) " does not have type " CppAsString(typename)))
 #endif                                                 /* HAVE__BUILTIN_TYPES_COMPATIBLE_P */
index d49ec0ffbc5f35f9a6e6ad6178e86114a6f0c130..fc298a6c1d7912491536a79a37bcc580c4c805f0 100644 (file)
@@ -591,8 +591,8 @@ dlist_tail_node(dlist_head *head)
  * This is used to convert a dlist_node * back to its containing struct.
  */
 #define dlist_container(type, membername, ptr)                                                         \
-       (AssertVariableIsOfTypeMacro(ptr, dlist_node *),                                                \
-        AssertVariableIsOfTypeMacro(((type *) NULL)->membername, dlist_node),  \
+       (StaticAssertVariableIsOfTypeMacro(ptr, dlist_node *),                                          \
+        StaticAssertVariableIsOfTypeMacro(((type *) NULL)->membername, dlist_node),    \
         ((type *) ((char *) (ptr) - offsetof(type, membername))))
 
 /*
@@ -601,7 +601,7 @@ dlist_tail_node(dlist_head *head)
  * The list must not be empty.
  */
 #define dlist_head_element(type, membername, lhead)                                                    \
-       (AssertVariableIsOfTypeMacro(((type *) NULL)->membername, dlist_node),  \
+       (StaticAssertVariableIsOfTypeMacro(((type *) NULL)->membername, dlist_node),    \
         (type *) dlist_head_element_off(lhead, offsetof(type, membername)))
 
 /*
@@ -610,7 +610,7 @@ dlist_tail_node(dlist_head *head)
  * The list must not be empty.
  */
 #define dlist_tail_element(type, membername, lhead)                                                    \
-       (AssertVariableIsOfTypeMacro(((type *) NULL)->membername, dlist_node),  \
+       (StaticAssertVariableIsOfTypeMacro(((type *) NULL)->membername, dlist_node),    \
         ((type *) dlist_tail_element_off(lhead, offsetof(type, membername))))
 
 /*
@@ -621,8 +621,8 @@ dlist_tail_node(dlist_head *head)
  * It is *not* allowed to manipulate the list during iteration.
  */
 #define dlist_foreach(iter, lhead)                                                                                     \
-       for (AssertVariableIsOfTypeMacro(iter, dlist_iter),                                             \
-                AssertVariableIsOfTypeMacro(lhead, dlist_head *),                                      \
+       for (StaticAssertVariableIsOfTypeMacro(iter, dlist_iter),                                               \
+                StaticAssertVariableIsOfTypeMacro(lhead, dlist_head *),                                        \
                 (iter).end = &(lhead)->head,                                                                           \
                 (iter).cur = (iter).end->next ? (iter).end->next : (iter).end;         \
                 (iter).cur != (iter).end;                                                                                      \
@@ -638,8 +638,8 @@ dlist_tail_node(dlist_head *head)
  * fine to insert or delete adjacent nodes.
  */
 #define dlist_foreach_modify(iter, lhead)                                                                      \
-       for (AssertVariableIsOfTypeMacro(iter, dlist_mutable_iter),                             \
-                AssertVariableIsOfTypeMacro(lhead, dlist_head *),                                      \
+       for (StaticAssertVariableIsOfTypeMacro(iter, dlist_mutable_iter),                               \
+                StaticAssertVariableIsOfTypeMacro(lhead, dlist_head *),                                        \
                 (iter).end = &(lhead)->head,                                                                           \
                 (iter).cur = (iter).end->next ? (iter).end->next : (iter).end,         \
                 (iter).next = (iter).cur->next;                                                                        \
@@ -652,8 +652,8 @@ dlist_tail_node(dlist_head *head)
  * It is *not* allowed to manipulate the list during iteration.
  */
 #define dlist_reverse_foreach(iter, lhead)                                                                     \
-       for (AssertVariableIsOfTypeMacro(iter, dlist_iter),                                             \
-                AssertVariableIsOfTypeMacro(lhead, dlist_head *),                                      \
+       for (StaticAssertVariableIsOfTypeMacro(iter, dlist_iter),                                               \
+                StaticAssertVariableIsOfTypeMacro(lhead, dlist_head *),                                        \
                 (iter).end = &(lhead)->head,                                                                           \
                 (iter).cur = (iter).end->prev ? (iter).end->prev : (iter).end;         \
                 (iter).cur != (iter).end;                                                                                      \
@@ -953,7 +953,7 @@ dclist_count(const dclist_head *head)
   * The list must not be empty.
   */
 #define dclist_head_element(type, membername, lhead)                                                   \
-       (AssertVariableIsOfTypeMacro(((type *) NULL)->membername, dlist_node),  \
+       (StaticAssertVariableIsOfTypeMacro(((type *) NULL)->membername, dlist_node),    \
         (type *) dclist_head_element_off(lhead, offsetof(type, membername)))
 
  /*
@@ -962,7 +962,7 @@ dclist_count(const dclist_head *head)
   * The list must not be empty.
   */
 #define dclist_tail_element(type, membername, lhead)                                                   \
-       (AssertVariableIsOfTypeMacro(((type *) NULL)->membername, dlist_node),  \
+       (StaticAssertVariableIsOfTypeMacro(((type *) NULL)->membername, dlist_node),    \
         ((type *) dclist_tail_element_off(lhead, offsetof(type, membername))))
 
 
@@ -1104,8 +1104,8 @@ slist_delete_current(slist_mutable_iter *iter)
  * This is used to convert a slist_node * back to its containing struct.
  */
 #define slist_container(type, membername, ptr)                                                         \
-       (AssertVariableIsOfTypeMacro(ptr, slist_node *),                                                \
-        AssertVariableIsOfTypeMacro(((type *) NULL)->membername, slist_node),  \
+       (StaticAssertVariableIsOfTypeMacro(ptr, slist_node *),                                          \
+        StaticAssertVariableIsOfTypeMacro(((type *) NULL)->membername, slist_node),    \
         ((type *) ((char *) (ptr) - offsetof(type, membername))))
 
 /*
@@ -1114,7 +1114,7 @@ slist_delete_current(slist_mutable_iter *iter)
  * The list must not be empty.
  */
 #define slist_head_element(type, membername, lhead)                                                    \
-       (AssertVariableIsOfTypeMacro(((type *) NULL)->membername, slist_node),  \
+       (StaticAssertVariableIsOfTypeMacro(((type *) NULL)->membername, slist_node),    \
         (type *) slist_head_element_off(lhead, offsetof(type, membername)))
 
 /*
@@ -1130,8 +1130,8 @@ slist_delete_current(slist_mutable_iter *iter)
  * not safe.)
  */
 #define slist_foreach(iter, lhead)                                                                                     \
-       for (AssertVariableIsOfTypeMacro(iter, slist_iter),                                             \
-                AssertVariableIsOfTypeMacro(lhead, slist_head *),                                      \
+       for (StaticAssertVariableIsOfTypeMacro(iter, slist_iter),                                               \
+                StaticAssertVariableIsOfTypeMacro(lhead, slist_head *),                                        \
                 (iter).cur = (lhead)->head.next;                                                                       \
                 (iter).cur != NULL;                                                                                            \
                 (iter).cur = (iter).cur->next)
@@ -1146,8 +1146,8 @@ slist_delete_current(slist_mutable_iter *iter)
  * deletion of nodes adjacent to the current node would misbehave.
  */
 #define slist_foreach_modify(iter, lhead)                                                                      \
-       for (AssertVariableIsOfTypeMacro(iter, slist_mutable_iter),                             \
-                AssertVariableIsOfTypeMacro(lhead, slist_head *),                                      \
+       for (StaticAssertVariableIsOfTypeMacro(iter, slist_mutable_iter),                               \
+                StaticAssertVariableIsOfTypeMacro(lhead, slist_head *),                                        \
                 (iter).prev = &(lhead)->head,                                                                          \
                 (iter).cur = (iter).prev->next,                                                                        \
                 (iter).next = (iter).cur ? (iter).cur->next : NULL;                            \
index b93ea5b638d9c161366922f39c2fa2d92cbba13d..f1582c98626a7f7d576df82a14e576b9f73c7b3f 100644 (file)
@@ -41,16 +41,16 @@ typedef struct pairingheap_node
  * This is used to convert a pairingheap_node * back to its containing struct.
  */
 #define pairingheap_container(type, membername, ptr) \
-       (AssertVariableIsOfTypeMacro(ptr, pairingheap_node *), \
-        AssertVariableIsOfTypeMacro(((type *) NULL)->membername, pairingheap_node),  \
+       (StaticAssertVariableIsOfTypeMacro(ptr, pairingheap_node *), \
+        StaticAssertVariableIsOfTypeMacro(((type *) NULL)->membername, pairingheap_node),  \
         ((type *) ((char *) (ptr) - offsetof(type, membername))))
 
 /*
  * Like pairingheap_container, but used when the pointer is 'const ptr'
  */
 #define pairingheap_const_container(type, membername, ptr) \
-       (AssertVariableIsOfTypeMacro(ptr, const pairingheap_node *), \
-        AssertVariableIsOfTypeMacro(((type *) NULL)->membername, pairingheap_node),  \
+       (StaticAssertVariableIsOfTypeMacro(ptr, const pairingheap_node *), \
+        StaticAssertVariableIsOfTypeMacro(((type *) NULL)->membername, pairingheap_node),  \
         ((const type *) ((const char *) (ptr) - offsetof(type, membername))))
 
 /*
index 8b92f453e7ab329c9dd201ef12af5fcd1a8baac7..a7a6584e762cd1987ae82cb4178d0202bc8295ae 100644 (file)
@@ -533,9 +533,9 @@ Float8GetDatum(float8 X)
  */
 
 #define Int64GetDatumFast(X) \
-       (AssertVariableIsOfTypeMacro(X, int64), Int64GetDatum(X))
+       (StaticAssertVariableIsOfTypeMacro(X, int64), Int64GetDatum(X))
 #define Float8GetDatumFast(X) \
-       (AssertVariableIsOfTypeMacro(X, double), Float8GetDatum(X))
+       (StaticAssertVariableIsOfTypeMacro(X, double), Float8GetDatum(X))
 
 
 /* ----------------------------------------------------------------
index 965609145e4072130fbb03abe99571a2d0afd143..9caf109a8450c5bdbb55a14f22831de163b0d7a7 100644 (file)
@@ -204,8 +204,8 @@ proclist_pop_head_node_offset(proclist_head *list, size_t node_offset)
  * node with proclist_delete(list, iter.cur, node_offset).
  */
 #define proclist_foreach_modify(iter, lhead, link_member)                                      \
-       for (AssertVariableIsOfTypeMacro(iter, proclist_mutable_iter),                  \
-                AssertVariableIsOfTypeMacro(lhead, proclist_head *),                           \
+       for (StaticAssertVariableIsOfTypeMacro(iter, proclist_mutable_iter),                    \
+                StaticAssertVariableIsOfTypeMacro(lhead, proclist_head *),                             \
                 (iter).cur = (lhead)->head,                                                                            \
                 (iter).next = (iter).cur == INVALID_PROC_NUMBER ? INVALID_PROC_NUMBER :        \
                         proclist_node_get((iter).cur,                                                                  \
index 8c0e0edd79139814b17f2365692d2cbda9ff8f32..2681fd6d5ea960ebc7484fb75e32cb7325175569 100644 (file)
@@ -65,7 +65,7 @@ struct FreePageManager
 
 /* Macros to convert between page numbers (expressed as Size) and pointers. */
 #define fpm_page_to_pointer(base, page) \
-       (AssertVariableIsOfTypeMacro(page, Size), \
+       (StaticAssertVariableIsOfTypeMacro(page, Size), \
         (base) + FPM_PAGE_SIZE * (page))
 #define fpm_pointer_to_page(base, ptr)         \
        (((Size) (((char *) (ptr)) - (base))) / FPM_PAGE_SIZE)
index aeb17fa24a50e7b1ba08de781ee96e876da3b0b6..94975f2f237bace3d88ce61db0956722ae2316b9 100644 (file)
 
 #ifdef HAVE_TYPEOF
 #define relptr_access(base, rp) \
-       (AssertVariableIsOfTypeMacro(base, char *), \
+       (StaticAssertVariableIsOfTypeMacro(base, char *), \
         (typeof((rp).relptr_type)) ((rp).relptr_off == 0 ? NULL : \
                (base) + (rp).relptr_off - 1))
 #else
 #define relptr_access(base, rp) \
-       (AssertVariableIsOfTypeMacro(base, char *), \
+       (StaticAssertVariableIsOfTypeMacro(base, char *), \
         (void *) ((rp).relptr_off == 0 ? NULL : (base) + (rp).relptr_off - 1))
 #endif
 
@@ -70,12 +70,12 @@ relptr_store_eval(char *base, char *val)
 
 #ifdef HAVE_TYPEOF
 #define relptr_store(base, rp, val) \
-       (AssertVariableIsOfTypeMacro(base, char *), \
-        AssertVariableIsOfTypeMacro(val, typeof((rp).relptr_type)), \
+       (StaticAssertVariableIsOfTypeMacro(base, char *), \
+        StaticAssertVariableIsOfTypeMacro(val, typeof((rp).relptr_type)), \
         (rp).relptr_off = relptr_store_eval((base), (char *) (val)))
 #else
 #define relptr_store(base, rp, val) \
-       (AssertVariableIsOfTypeMacro(base, char *), \
+       (StaticAssertVariableIsOfTypeMacro(base, char *), \
         (rp).relptr_off = relptr_store_eval((base), (char *) (val)))
 #endif