Skip to content

Commit

Permalink
capi: Rename BLAZE_SYM_UNDEFINED to BLAZE_SYM_UNDEF
Browse files Browse the repository at this point in the history
Given our abbreviated names BLAZE_SYM_FUNC and BLAZE_SYM_VAR, it makes
sense to shorten BLAZE_SYM_UNDEFINED to BLAZE_SYM_UNDEF. Rename the
variant accordingly.

Signed-off-by: Daniel Müller <deso@posteo.net>
  • Loading branch information
d-e-s-o authored and danielocfb committed Jan 29, 2024
1 parent 22cced0 commit 47564c2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion capi/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ Unreleased
- Added `blaze_normalizer_new_opts` function and `blaze_normalizer_opts` type
- Renamed various symbolization functions to closer reflect Rust
terminology
- Renamed `BLAZE_SYM_UNKNOWN` enum variant to `BLAZE_SYM_UNDEFINED`
- Renamed `BLAZE_SYM_UNKNOWN` enum variant to `BLAZE_SYM_UNDEF`
- Added `perf_map` member to `blaze_symbolize_src_process` function
2 changes: 1 addition & 1 deletion capi/include/blazesym.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ typedef enum blaze_sym_type {
* other variants (functions and variables), whereas in output
* contexts it means that the type is not known.
*/
BLAZE_SYM_UNDEFINED,
BLAZE_SYM_UNDEF,
/**
* The symbol is a function.
*/
Expand Down
6 changes: 3 additions & 3 deletions capi/src/inspect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pub enum blaze_sym_type {
/// In input contexts this variant can be used to encompass all
/// other variants (functions and variables), whereas in output
/// contexts it means that the type is not known.
BLAZE_SYM_UNDEFINED,
BLAZE_SYM_UNDEF,
/// The symbol is a function.
BLAZE_SYM_FUNC,
/// The symbol is a variable.
Expand All @@ -108,7 +108,7 @@ pub enum blaze_sym_type {
impl From<SymType> for blaze_sym_type {
fn from(other: SymType) -> Self {
match other {
SymType::Undefined => blaze_sym_type::BLAZE_SYM_UNDEFINED,
SymType::Undefined => blaze_sym_type::BLAZE_SYM_UNDEF,
SymType::Function => blaze_sym_type::BLAZE_SYM_FUNC,
SymType::Variable => blaze_sym_type::BLAZE_SYM_VAR,
_ => unreachable!(),
Expand Down Expand Up @@ -212,7 +212,7 @@ fn convert_syms_list_to_c(syms_list: Vec<Vec<SymInfo>>) -> *const *const blaze_s
name: ptr::null(),
addr: 0,
size: 0,
sym_type: blaze_sym_type::BLAZE_SYM_UNDEFINED,
sym_type: blaze_sym_type::BLAZE_SYM_UNDEF,
file_offset: 0,
obj_file_name: ptr::null(),
}
Expand Down

0 comments on commit 47564c2

Please sign in to comment.