From b01f92a7efe481e67d1eb96c98078cbd793b67d9 Mon Sep 17 00:00:00 2001 From: Markus PiƩton Date: Mon, 19 Apr 2021 19:33:34 +0200 Subject: Fix wrong CorePluginABIVersion, plugin_abi_version, and plugin_abi_minimum_version --- rust/examples/flowgraph/src/lib.rs | 6 ------ rust/src/lib.rs | 8 +++++--- 2 files changed, 5 insertions(+), 9 deletions(-) (limited to 'rust') diff --git a/rust/examples/flowgraph/src/lib.rs b/rust/examples/flowgraph/src/lib.rs index 4d5c2241..ac586922 100644 --- a/rust/examples/flowgraph/src/lib.rs +++ b/rust/examples/flowgraph/src/lib.rs @@ -4,7 +4,6 @@ use binaryninja::{ disassembly::{DisassemblyTextLine, InstructionTextToken, InstructionTextTokenType}, flowgraph::{BranchType, EdgePenStyle, EdgeStyle, FlowGraph, FlowGraphNode, ThemeColor}, }; -use binaryninja::plugin_abi_version; fn test_graph(view: &BinaryView) { let graph = FlowGraph::new(); @@ -49,8 +48,3 @@ pub extern "C" fn UIPluginInit() -> bool { ); true } - -#[no_mangle] -pub extern "C" fn UIPluginABIVersion() -> u32 { - plugin_abi_version() -} diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 471c04ce..b822523a 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -217,12 +217,14 @@ pub fn version() -> string::BnString { unsafe { string::BnString::from_raw(binaryninjacore_sys::BNGetVersionString()) } } +// TODO : We need to get this from uitypes.h::BN_CURRENT_UI_ABI_VERSION pub fn plugin_abi_version() -> u32 { - binaryninjacore_sys::BN_CURRENT_CORE_ABI_VERSION + 2 } +// TODO : We need to get this from uitypes.h::BN_MINIMUM_UI_ABI_VERSION pub fn plugin_abi_minimum_version() -> u32 { - binaryninjacore_sys::BN_MINIMUM_CORE_ABI_VERSION + 2 } pub fn core_abi_version() -> u32 { @@ -238,7 +240,7 @@ pub fn core_abi_minimum_version() -> u32 { #[no_mangle] #[allow(non_snake_case)] pub extern "C" fn CorePluginABIVersion() -> u32 { - plugin_abi_version() + core_abi_version() } // TODO : We need to get this from uitypes.h -- cgit v1.3.1