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 6a37837 commit 4a43f66
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions rust/src/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ impl Function {
/// * `operand` - Operand index of the token, defined as the number of OperandSeparatorTokens in the disassembly line before the token
/// * `display_type` - Desired display type
/// * `arch` - (optional) Architecture of the instruction or IL line containing the token
/// * `enum_display_typeid` - (optional) Whenever passing EnumDisplayType to ``display_type``, passing a type ID here will specify the Enumeration display type. Must be a valid type ID and resolve to an enumeration type.
/// * `enum_display_typeid` - (optional) Whenever passing EnumDisplayType to `display_type`, passing a type ID here will specify the Enumeration display type. Must be a valid type ID and resolve to an enumeration type.
pub fn set_int_display_type(
&self,
instr_addr: u64,
Expand Down Expand Up @@ -1778,7 +1778,7 @@ impl Function {
unsafe { BNIsCallInstruction(self.handle, arch.0, addr) }
}

pub fn is_var_user_defined(&self, var: &Variable) -> bool {
pub fn is_variable_user_defined(&self, var: &Variable) -> bool {
unsafe { BNIsVariableUserDefined(self.handle, &var.raw()) }
}

Expand Down Expand Up @@ -1838,8 +1838,8 @@ impl Function {
unsafe { Array::new(vars, count, ()) }
}

/// Merge one or more varibles in ``sources`` into the ``target`` variable. All
/// variable accesses to the variables in ``sources`` will be rewritten to use ``target``.
/// Merge one or more varibles in `sources` into the `target` variable. All
/// variable accesses to the variables in `sources` will be rewritten to use `target`.
///
/// * `target` - target variable
/// * `sources` - list of source variables
Expand All @@ -1859,8 +1859,8 @@ impl Function {
}
}

/// Undoes variable merging performed with ``merge_vars``. The variables in
/// ``sources`` will no longer be merged into the ``target`` variable.
/// Undoes variable merging performed with `merge_vars`. The variables in
/// `sources` will no longer be merged into the `target` variable.
///
/// * `target` - target variable
/// * `sources` - list of source variables
Expand All @@ -1880,30 +1880,30 @@ impl Function {
}
}

/// Splits a varible at the definition site. The given ``var`` must be the
/// Splits a varible at the definition site. The given `var` must be the
/// variable unique to the definition and should be obtained by using
/// ``MediumLevelILInstruction.get_split_var_for_definition`` at the definition site.
/// [MediumLevelILInstruction::get_split_var_for_definition] at the definition site.
///
/// This function is not meant to split variables that have been previously merged. Use
/// ``unmerge_vars`` to split previously merged variables.
/// `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 \
/// 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.
///
/// * `var` - variable to split
pub fn split_var(&self, var: &Variable) {
pub fn split_variable(&self, var: &Variable) {
unsafe { BNSplitVariable(self.handle, &var.raw()) }
}

/// Undoes varible splitting performed with ``split_var``. The given ``var``
/// Undoes varible splitting performed with `split_var`. The given `var`
/// must be the variable unique to the definition and should be obtained by using
/// ``MediumLevelILInstruction.get_split_var_for_definition`` at the definition site.
/// [MediumLevelILInstruction::get_split_var_for_definition] at the definition site.
///
/// * `var` - variable to unsplit
pub fn unsplit_var(&self, var: &Variable) {
pub fn unsplit_variable(&self, var: &Variable) {
unsafe { BNUnsplitVariable(self.handle, &var.raw()) }
}

Expand Down

0 comments on commit 4a43f66

Please sign in to comment.