Skip to content

Commit 78797bd

Browse files
authored
Update the c_enum crate to v0.2 (#42)
Since v0.2 no longer supports declaring multiple enums in a single c_enum! block I have also gone and split up the blocks where necessary.
1 parent 27fa0a7 commit 78797bd

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

perf-event/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ hooks = []
2424

2525
[dependencies]
2626
bitflags = "2.1"
27-
c-enum = "0.1"
27+
c-enum = "0.2.0"
2828
libc = "0.2"
2929
memmap2 = "0.9"
3030
perf-event-data = "0.1.1"

perf-event/src/events/cache.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ c_enum! {
105105
/// Memory accesses that stay local to the originating NUMA node.
106106
NODE = bindings::PERF_COUNT_HW_CACHE_NODE as _,
107107
}
108+
}
108109

110+
c_enum! {
109111
/// What sort of cache operation we would like to observe.
110112
///
111113
/// This is used in the `Cache` type as part of the identification of a cache
@@ -126,7 +128,9 @@ c_enum! {
126128
/// Prefetch accesses.
127129
PREFETCH = bindings::PERF_COUNT_HW_CACHE_OP_PREFETCH as _,
128130
}
131+
}
129132

133+
c_enum! {
130134
/// What sort of cache result we're interested in observing.
131135
///
132136
/// `ACCESS` counts the total number of operations performed on the cache,

0 commit comments

Comments
 (0)