From 1fc3cd833f19ffa534f04caf541e88042124fd91 Mon Sep 17 00:00:00 2001 From: Alexander Taylor Date: Tue, 25 Feb 2025 20:32:24 -0500 Subject: Remove platform registration API footgun. Turns out, you can just pass this thing an architecture that is *completely* different from the one in the platform you are also passing in and it'll just happily do the wrong thing. While that's pretty wild, I'm in favor of not having to make this particular mistake again the next time I copy/paste some code, so we're now deprecating it. --- binaryninjaapi.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'binaryninjaapi.h') diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 08e3feb5..4336febb 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -7203,6 +7203,14 @@ namespace BinaryNinja { /*! Register a Platform for a specific view type + \param name Name of the BinaryViewType + \param id ID of the platform + \param platform The Platform to register + */ + static void RegisterPlatform(const std::string& name, uint32_t id, Platform* platform); + + /*! Register a Platform for a specific view type (this form is deprecated as of 4.3, please use the form without architecture as an argument instead) + \param name Name of the BinaryViewType \param id ID of the platform \param arch Architecture to register this platform with -- cgit v1.3.1