Skip to content

Commit

Permalink
docs: add comments for YRX_METADATA_ENTRY fields
Browse files Browse the repository at this point in the history
  • Loading branch information
plusvic committed May 23, 2024
1 parent 9f90eaa commit 88d30e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions capi/include/yara_x.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ typedef union YRX_METADATA_VALUE {
typedef struct YRX_METADATA_ENTRY {
// Metadata identifier.
char *identifier;
// Type of value.
enum YRX_METADATA_VALUE_TYPE value_type;
// The value itself. This is a union, use the member that matches the
// value type.
union YRX_METADATA_VALUE value;
} YRX_METADATA_ENTRY;

Expand Down
3 changes: 3 additions & 0 deletions capi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,10 @@ union YRX_METADATA_VALUE {
pub struct YRX_METADATA_ENTRY {
/// Metadata identifier.
identifier: *mut c_char,
/// Type of value.
value_type: YRX_METADATA_VALUE_TYPE,
/// The value itself. This is a union, use the member that matches the
/// value type.
value: YRX_METADATA_VALUE,
}

Expand Down

0 comments on commit 88d30e0

Please sign in to comment.