MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / create_user_var

Method create_user_var

rust/src/medium_level_il/function.rs:147–166  ·  view source on GitHub ↗
(
        &self,
        var: &Variable,
        var_type: C,
        name: S,
        ignore_disjoint_uses: bool,
    )

Source from the content-addressed store, hash-verified

145 }
146
147 pub fn create_user_var<'a, S: BnStrCompatible, C: Into<Conf<&'a Type>>>(
148 &self,
149 var: &Variable,
150 var_type: C,
151 name: S,
152 ignore_disjoint_uses: bool,
153 ) {
154 let raw_var = BNVariable::from(var);
155 let mut owned_raw_var_ty = Conf::<&Type>::into_raw(var_type.into());
156 let name = name.into_bytes_with_nul();
157 unsafe {
158 BNCreateUserVariable(
159 self.function().handle,
160 &raw_var,
161 &mut owned_raw_var_ty,
162 name.as_ref().as_ptr() as *const _,
163 ignore_disjoint_uses,
164 )
165 }
166 }
167
168 pub fn delete_user_var(&self, var: &Variable) {
169 let raw_var = BNVariable::from(var);

Callers

nothing calls this directly

Calls 3

into_bytes_with_nulMethod · 0.80
functionMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected