From ae5e27c96d2f1954dc951d1483bf1dfba4be4bfd Mon Sep 17 00:00:00 2001 From: Vipul Cariappa Date: Tue, 17 Dec 2024 19:24:33 +0530 Subject: [PATCH] update `Cpp::GetVariableOffset` according to API changes to handle multiple inheritance --- clingwrapper/src/clingwrapper.cxx | 4 ++-- clingwrapper/src/cpp_cppyy.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/clingwrapper/src/clingwrapper.cxx b/clingwrapper/src/clingwrapper.cxx index 6062c5ad..dad95b7a 100644 --- a/clingwrapper/src/clingwrapper.cxx +++ b/clingwrapper/src/clingwrapper.cxx @@ -1710,9 +1710,9 @@ std::string Cppyy::GetTypeAsString(TCppType_t type) return Cpp::GetTypeAsString(type); } -intptr_t Cppyy::GetDatamemberOffset(TCppScope_t var) +intptr_t Cppyy::GetDatamemberOffset(TCppScope_t var, TCppScope_t klass) { - return Cpp::GetVariableOffset(Cpp::GetUnderlyingScope(var)); + return Cpp::GetVariableOffset(Cpp::GetUnderlyingScope(var), klass); } // static inline diff --git a/clingwrapper/src/cpp_cppyy.h b/clingwrapper/src/cpp_cppyy.h index 70b2969a..fd6e90da 100644 --- a/clingwrapper/src/cpp_cppyy.h +++ b/clingwrapper/src/cpp_cppyy.h @@ -349,7 +349,7 @@ namespace Cppyy { RPY_EXPORTED std::string GetTypeAsString(TCppType_t type); RPY_EXPORTED - intptr_t GetDatamemberOffset(TCppScope_t var); + intptr_t GetDatamemberOffset(TCppScope_t var, TCppScope_t klass = nullptr); RPY_EXPORTED bool CheckDatamember(TCppScope_t scope, const std::string& name);