diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 113f56d..b15267f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -304,7 +304,10 @@ jobs: run: | brew update brew remove ruby@3.0 - brew remove unxip + export ARCHITECHURE=$(uname -m) + if [[ "$ARCHITECHURE" != "x86_64" ]]; then + brew remove unxip + fi # workaround for https://github.com/actions/setup-python/issues/577 for pkg in $(brew list | grep '^python@'); do brew unlink "$pkg" diff --git a/src/CPPDataMember.cxx b/src/CPPDataMember.cxx index 0fa7351..eb83e4e 100644 --- a/src/CPPDataMember.cxx +++ b/src/CPPDataMember.cxx @@ -323,7 +323,7 @@ void CPyCppyy::CPPDataMember::Set(Cppyy::TCppScope_t scope, Cppyy::TCppScope_t d { fEnclosingScope = scope; fScope = data; - fOffset = Cppyy::GetDatamemberOffset(data); // XXX: Check back here // TODO: make lazy + fOffset = Cppyy::GetDatamemberOffset(data, scope); // XXX: Check back here // TODO: make lazy fFlags = Cppyy::IsStaticDatamember(data) ? kIsStaticData : 0; const std::string name = Cppyy::GetFinalName(data); diff --git a/src/Cppyy.h b/src/Cppyy.h index 0ab2f78..4d01f75 100644 --- a/src/Cppyy.h +++ b/src/Cppyy.h @@ -324,7 +324,7 @@ namespace Cppyy { CPPYY_IMPORT std::string GetDatamemberTypeAsString(TCppScope_t var); CPPYY_IMPORT - intptr_t GetDatamemberOffset(TCppScope_t var); + intptr_t GetDatamemberOffset(TCppScope_t var, TCppScope_t klass = nullptr); CPPYY_IMPORT bool CheckDatamember(TCppScope_t scope, const std::string& name);