summaryrefslogtreecommitdiff
path: root/lib/ccan/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ccan/compiler')
-rw-r--r--lib/ccan/compiler/_info4
-rw-r--r--lib/ccan/compiler/compiler.h8
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/ccan/compiler/_info b/lib/ccan/compiler/_info
index e42ebb0fb3..9f39453973 100644
--- a/lib/ccan/compiler/_info
+++ b/lib/ccan/compiler/_info
@@ -10,7 +10,7 @@
* For functions not called in fast paths (aka. cold functions)
* - PRINTF_FMT
* For functions which take printf-style parameters.
- * - IDEMPOTENT
+ * - CONST_FUNCTION
* For functions which return the same value for same parameters.
* - NEEDED
* For functions and variables which must be emitted even if unused.
@@ -18,7 +18,7 @@
* For functions and variables which need not be emitted if unused.
* - UNUSED
* For parameters which are not used.
- * - IS_COMPILE_CONSTANT
+ * - IS_COMPILE_CONSTANT()
* For using different tradeoffs for compiletime vs runtime evaluation.
*
* License: Public Domain
diff --git a/lib/ccan/compiler/compiler.h b/lib/ccan/compiler/compiler.h
index 74e0f1835c..fcb89c8f2a 100644
--- a/lib/ccan/compiler/compiler.h
+++ b/lib/ccan/compiler/compiler.h
@@ -61,18 +61,18 @@
#endif
#endif
-#ifndef IDEMPOTENT
+#ifndef CONST_FUNCTION
#if HAVE_ATTRIBUTE_CONST
/**
- * IDEMPOTENT - a function's return depends only on its argument
+ * CONST_FUNCTION - a function's return depends only on its argument
*
* This allows the compiler to assume that the function will return the exact
* same value for the exact same arguments. This implies that the function
* must not use global variables, or dereference pointer arguments.
*/
-#define IDEMPOTENT __attribute__((const))
+#define CONST_FUNCTION __attribute__((const))
#else
-#define IDEMPOTENT
+#define CONST_FUNCTION
#endif
#endif