aboutsummaryrefslogtreecommitdiff
path: root/src/include/nodes/pg_list.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/nodes/pg_list.h')
-rw-r--r--src/include/nodes/pg_list.h17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/include/nodes/pg_list.h b/src/include/nodes/pg_list.h
index 729456d6e5d..b7040df62de 100644
--- a/src/include/nodes/pg_list.h
+++ b/src/include/nodes/pg_list.h
@@ -71,34 +71,25 @@ struct ListCell
/*
* These routines are used frequently. However, we can't implement
* them as macros, since we want to avoid double-evaluation of macro
- * arguments. Therefore, we implement them using static inline functions
- * if supported by the compiler, or as regular functions otherwise.
- * See STATIC_IF_INLINE in c.h.
+ * arguments.
*/
-#ifndef PG_USE_INLINE
-extern ListCell *list_head(const List *l);
-extern ListCell *list_tail(List *l);
-extern int list_length(const List *l);
-#endif /* PG_USE_INLINE */
-#if defined(PG_USE_INLINE) || defined(PG_LIST_INCLUDE_DEFINITIONS)
-STATIC_IF_INLINE ListCell *
+static inline ListCell *
list_head(const List *l)
{
return l ? l->head : NULL;
}
-STATIC_IF_INLINE ListCell *
+static inline ListCell *
list_tail(List *l)
{
return l ? l->tail : NULL;
}
-STATIC_IF_INLINE int
+static inline int
list_length(const List *l)
{
return l ? l->length : 0;
}
-#endif /*-- PG_USE_INLINE || PG_LIST_INCLUDE_DEFINITIONS */
/*
* NB: There is an unfortunate legacy from a previous incarnation of