summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--architecture.cpp6
-rw-r--r--binaryninjaapi.h18
-rw-r--r--binaryview.cpp14
-rw-r--r--function.cpp4
4 files changed, 21 insertions, 21 deletions
diff --git a/architecture.cpp b/architecture.cpp
index a10ef29c..af7b0cba 100644
--- a/architecture.cpp
+++ b/architecture.cpp
@@ -163,7 +163,7 @@ bool Architecture::GetInstructionLowLevelILCallback(void* ctxt, const uint8_t* d
size_t* len, BNLowLevelILFunction* il)
{
Architecture* arch = (Architecture*)ctxt;
- LowLevelILFunction func(BNNewLowLevelILFunctionReference(il));
+ LowLevelILFunction func(il);
return arch->GetInstructionLowLevelIL(data, addr, *len, func);
}
@@ -281,7 +281,7 @@ size_t Architecture::GetFlagWriteLowLevelILCallback(void* ctxt, BNLowLevelILOper
uint32_t flag, BNRegisterOrConstant* operands, size_t operandCount, BNLowLevelILFunction* il)
{
Architecture* arch = (Architecture*)ctxt;
- LowLevelILFunction func(BNNewLowLevelILFunctionReference(il));
+ LowLevelILFunction func(il);
return arch->GetFlagWriteLowLevelIL(op, size, flagWriteType, flag, operands, operandCount, func);
}
@@ -290,7 +290,7 @@ size_t Architecture::GetFlagConditionLowLevelILCallback(void* ctxt, BNLowLevelIL
BNLowLevelILFunction* il)
{
Architecture* arch = (Architecture*)ctxt;
- LowLevelILFunction func(BNNewLowLevelILFunctionReference(il));
+ LowLevelILFunction func(il);
return arch->GetFlagConditionLowLevelIL(cond, func);
}
diff --git a/binaryninjaapi.h b/binaryninjaapi.h
index d3234dcc..f79e9d75 100644
--- a/binaryninjaapi.h
+++ b/binaryninjaapi.h
@@ -857,13 +857,13 @@ namespace BinaryNinja
std::vector<Ref<Symbol>> GetSymbolsOfType(BNSymbolType type);
std::vector<Ref<Symbol>> GetSymbolsOfType(BNSymbolType type, uint64_t start, uint64_t len);
- void DefineAutoSymbol(Symbol* sym);
- void UndefineAutoSymbol(Symbol* sym);
+ void DefineAutoSymbol(Ref<Symbol> sym);
+ void UndefineAutoSymbol(Ref<Symbol> sym);
- void DefineUserSymbol(Symbol* sym);
- void UndefineUserSymbol(Symbol* sym);
+ void DefineUserSymbol(Ref<Symbol> sym);
+ void UndefineUserSymbol(Ref<Symbol> sym);
- void DefineImportedFunction(Symbol* importAddressSym, Function* func);
+ void DefineImportedFunction(Ref<Symbol> importAddressSym, Ref<Function> func);
bool IsNeverBranchPatchAvailable(Architecture* arch, uint64_t addr);
bool IsAlwaysBranchPatchAvailable(Architecture* arch, uint64_t addr);
@@ -904,8 +904,8 @@ namespace BinaryNinja
std::map<std::string, Ref<Type>> GetTypes();
Ref<Type> GetTypeByName(const std::string& name);
bool IsTypeAutoDefined(const std::string& name);
- void DefineType(const std::string& name, Type* type);
- void DefineUserType(const std::string& name, Type* type);
+ void DefineType(const std::string& name, Ref<Type> type);
+ void DefineUserType(const std::string& name, Ref<Type> type);
void UndefineType(const std::string& name);
void UndefineUserType(const std::string& name);
@@ -1643,8 +1643,8 @@ namespace BinaryNinja
Ref<FunctionGraph> CreateFunctionGraph();
std::map<int64_t, StackVariable> GetStackLayout();
- void CreateAutoStackVariable(int64_t offset, Type* type, const std::string& name);
- void CreateUserStackVariable(int64_t offset, Type* type, const std::string& name);
+ void CreateAutoStackVariable(int64_t offset, Ref<Type> type, const std::string& name);
+ void CreateUserStackVariable(int64_t offset, Ref<Type> type, const std::string& name);
void DeleteAutoStackVariable(int64_t offset);
void DeleteUserStackVariable(int64_t offset);
bool GetStackVariableAtFrameOffset(int64_t offset, StackVariable& var);
diff --git a/binaryview.cpp b/binaryview.cpp
index 8a2d1c2d..cff3ed10 100644
--- a/binaryview.cpp
+++ b/binaryview.cpp
@@ -1082,31 +1082,31 @@ vector<Ref<Symbol>> BinaryView::GetSymbolsOfType(BNSymbolType type, uint64_t sta
}
-void BinaryView::DefineAutoSymbol(Symbol* sym)
+void BinaryView::DefineAutoSymbol(Ref<Symbol> sym)
{
BNDefineAutoSymbol(m_object, sym->GetObject());
}
-void BinaryView::UndefineAutoSymbol(Symbol* sym)
+void BinaryView::UndefineAutoSymbol(Ref<Symbol> sym)
{
BNUndefineAutoSymbol(m_object, sym->GetObject());
}
-void BinaryView::DefineUserSymbol(Symbol* sym)
+void BinaryView::DefineUserSymbol(Ref<Symbol> sym)
{
BNDefineUserSymbol(m_object, sym->GetObject());
}
-void BinaryView::UndefineUserSymbol(Symbol* sym)
+void BinaryView::UndefineUserSymbol(Ref<Symbol> sym)
{
BNUndefineUserSymbol(m_object, sym->GetObject());
}
-void BinaryView::DefineImportedFunction(Symbol* importAddressSym, Function* func)
+void BinaryView::DefineImportedFunction(Ref<Symbol> importAddressSym, Ref<Function> func)
{
BNDefineImportedFunction(m_object, importAddressSym->GetObject(), func->GetObject());
}
@@ -1397,13 +1397,13 @@ bool BinaryView::IsTypeAutoDefined(const std::string& name)
}
-void BinaryView::DefineType(const std::string& name, Type* type)
+void BinaryView::DefineType(const std::string& name, Ref<Type> type)
{
BNDefineAnalysisType(m_object, name.c_str(), type->GetObject());
}
-void BinaryView::DefineUserType(const std::string& name, Type* type)
+void BinaryView::DefineUserType(const std::string& name, Ref<Type> type)
{
BNDefineUserAnalysisType(m_object, name.c_str(), type->GetObject());
}
diff --git a/function.cpp b/function.cpp
index 7c188e72..c5033276 100644
--- a/function.cpp
+++ b/function.cpp
@@ -406,13 +406,13 @@ map<int64_t, StackVariable> Function::GetStackLayout()
}
-void Function::CreateAutoStackVariable(int64_t offset, Type* type, const string& name)
+void Function::CreateAutoStackVariable(int64_t offset, Ref<Type> type, const string& name)
{
BNCreateAutoStackVariable(m_object, offset, type->GetObject(), name.c_str());
}
-void Function::CreateUserStackVariable(int64_t offset, Type* type, const string& name)
+void Function::CreateUserStackVariable(int64_t offset, Ref<Type> type, const string& name)
{
BNCreateUserStackVariable(m_object, offset, type->GetObject(), name.c_str());
}