mirror of
https://github.com/google/cpu_features.git
synced 2025-04-28 07:23:37 +02:00
Make getter/setter static so they don't leak
This commit is contained in:
parent
400d4f2836
commit
6fd9a8ca58
@ -48,11 +48,13 @@
|
|||||||
#define FEAT_ENUM_LAST FEAT_ENUM_LAST_(INTROSPECTION_ENUM_PREFIX)
|
#define FEAT_ENUM_LAST FEAT_ENUM_LAST_(INTROSPECTION_ENUM_PREFIX)
|
||||||
|
|
||||||
// Generate individual getters and setters.
|
// Generate individual getters and setters.
|
||||||
#define LINE(ENUM, NAME, A, B, C) \
|
#define LINE(ENUM, NAME, A, B, C) \
|
||||||
void set_##ENUM(FEAT_TYPE_NAME* features, bool value) { \
|
static void set_##ENUM(FEAT_TYPE_NAME* features, bool value) { \
|
||||||
features->NAME = value; \
|
features->NAME = value; \
|
||||||
} \
|
} \
|
||||||
int get_##ENUM(const FEAT_TYPE_NAME* features) { return features->NAME; }
|
static int get_##ENUM(const FEAT_TYPE_NAME* features) { \
|
||||||
|
return features->NAME; \
|
||||||
|
}
|
||||||
INTROSPECTION_TABLE
|
INTROSPECTION_TABLE
|
||||||
#undef LINE
|
#undef LINE
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user