Skip to content

Commit

Permalink
fix documentation syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
rbran committed May 16, 2024
1 parent 4a43f66 commit b2ecd79
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions rust/src/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1230,8 +1230,8 @@ impl Function {

/// Returns a list of function Tags for the function.
///
/// `auto` - If None, gets all tags, if True, gets auto tags, if False, gets user tags
/// `tag_type` - If None, gets all tags, otherwise only gets tags of the given type
/// `auto` - If `None`, gets all tags, if `true`, gets auto tags, if `false`, gets user tags
/// `tag_type` - If `None`, gets all tags, otherwise only gets tags of the given type
pub fn function_tags(&self, auto: Option<bool>, tag_type: Option<&str>) -> Array<Tag> {
let mut count = 0;

Expand Down Expand Up @@ -1272,7 +1272,7 @@ impl Function {
/// Gets a list of Tags at the address.
///
/// * `addr` - Address to get tags from.
/// * `auto` - If None, gets all tags, if True, gets auto tags, if False, gets user tags
/// * `auto` - If `None`, gets all tags, if `true`, gets auto tags, if `false`, gets user tags
pub fn tags_at(
&self,
addr: u64,
Expand All @@ -1294,7 +1294,7 @@ impl Function {
/// Gets a list of Tags in the address range.
///
/// * `addr` - Address to get tags from.
/// * `auto` - If None, gets all tags, if True, gets auto tags, if False, gets user tags
/// * `auto` - If `None`, gets all tags, if `true`, gets auto tags, if `false`, gets user tags
pub fn tags_in_range(
&self,
range: Range<u64>,
Expand Down Expand Up @@ -1407,7 +1407,7 @@ impl Function {

/// Sets the highlights the instruction at the specified address with the supplied color
///
/// .. warning:: Use only in analysis plugins. Do not use in regular plugins, as colors won't be saved to the database.
/// <div class="warning">Use only in analysis plugins. Do not use in regular plugins, as colors won't be saved to the database.</div>
///
/// * `addr` - virtual address of the instruction to be highlighted
/// * `color` - Color value to use for highlighting
Expand Down Expand Up @@ -1887,12 +1887,16 @@ impl Function {
/// This function is not meant to split variables that have been previously merged. Use
/// `unmerge_vars` to split previously merged variables.
///
/// .. warning:: Binary Ninja automatically splits all variables that the analysis determines \
/// to be safely splittable. Splitting a variable manually with `split_var` can cause \
/// IL and decompilation to be incorrect. There are some patterns where variables can be safely \
/// split semantically but analysis cannot determine that it is safe. This function is provided \
/// <div class="warning">
///
/// Binary Ninja automatically splits all variables that the analysis determines
/// to be safely splittable. Splitting a variable manually with `split_var` can cause
/// IL and decompilation to be incorrect. There are some patterns where variables can be safely
/// split semantically but analysis cannot determine that it is safe. This function is provided
/// to allow variable splitting to be performed in these cases by plugins or by the user.
///
/// </div>
///
/// * `var` - variable to split
pub fn split_variable(&self, var: &Variable) {
unsafe { BNSplitVariable(self.handle, &var.raw()) }
Expand All @@ -1911,8 +1915,12 @@ impl Function {
///
/// * `update_type` - Desired update type
///
/// .. warning:: If analysis_skipped is True, using this API will not trigger
/// re-analysis. Instead, use [Function::set_analysis_skipped] with `False`.
/// <div class="warning">
///
/// If analysis_skipped is `true`, using this API will not trigger
/// re-analysis. Instead, use [Function::set_analysis_skipped] with `false`.
///
/// </div>
pub fn reanalyze(&self, update_type: FunctionUpdateType) {
unsafe { BNReanalyzeFunction(self.handle, update_type) }
}
Expand Down

0 comments on commit b2ecd79

Please sign in to comment.