Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/google/cpu_features.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2021-10-29 13:47:01 +0300
committerGuillaume Chatelet <gchatelet@google.com>2021-10-29 13:47:01 +0300
commit6fd9a8ca5854870dd2c42287901ffaf8355ea798 (patch)
tree248f36dcbb8b7ae6964db69c1bb4e26f4dce24d9
parent400d4f283668a664d5bb3a3ecd5182e2eb3f06c5 (diff)
Make getter/setter static so they don't leak
-rw-r--r--src/define_introspection.inl12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/define_introspection.inl b/src/define_introspection.inl
index 101a63b..c0eb916 100644
--- a/src/define_introspection.inl
+++ b/src/define_introspection.inl
@@ -48,11 +48,13 @@
#define FEAT_ENUM_LAST FEAT_ENUM_LAST_(INTROSPECTION_ENUM_PREFIX)
// Generate individual getters and setters.
-#define LINE(ENUM, NAME, A, B, C) \
- void set_##ENUM(FEAT_TYPE_NAME* features, bool value) { \
- features->NAME = value; \
- } \
- int get_##ENUM(const FEAT_TYPE_NAME* features) { return features->NAME; }
+#define LINE(ENUM, NAME, A, B, C) \
+ static void set_##ENUM(FEAT_TYPE_NAME* features, bool value) { \
+ features->NAME = value; \
+ } \
+ static int get_##ENUM(const FEAT_TYPE_NAME* features) { \
+ return features->NAME; \
+ }
INTROSPECTION_TABLE
#undef LINE