Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update Cppyy::GetDatamemberOffset to handle multiple inheritance #69

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,10 @@ jobs:
run: |
brew update
brew remove [email protected]
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"
Expand Down
2 changes: 1 addition & 1 deletion src/CPPDataMember.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/Cppyy.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down