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

ROOT-5819 rename offset calculation parameter from <target> to <base>. #36

Closed
Closed
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
6 changes: 3 additions & 3 deletions core/meta/src/TClass.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2330,9 +2330,9 @@ Int_t TClass::GetBaseClassOffset(const TClass *cl, void *address)

R__LOCKGUARD(gInterpreterMutex);
ClassInfo_t* derived = GetClassInfo();
ClassInfo_t* target = cl->GetClassInfo();
if(derived && target) {
return gCling->ClassInfo_GetBaseOffset(derived, target, address);
ClassInfo_t* base = cl->GetClassInfo();
if(derived && base) {
return gCling->ClassInfo_GetBaseOffset(derived, base, address);
}
else {
Int_t offset = GetBaseClassOffsetRecurse (cl);
Expand Down
8 changes: 4 additions & 4 deletions core/meta/src/TCling.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5090,15 +5090,15 @@ Long_t TCling::BaseClassInfo_Offset(BaseClassInfo_t* bcinfo, void * address) con
}

//______________________________________________________________________________
Long_t TCling::ClassInfo_GetBaseOffset(ClassInfo_t* derived, ClassInfo_t* target, void * address) const
Long_t TCling::ClassInfo_GetBaseOffset(ClassInfo_t* derived, ClassInfo_t* base, void * address) const
{
TClingClassInfo* TClinginfo = (TClingClassInfo*) derived;
TClingClassInfo* TClinginfoTarget = (TClingClassInfo*) target;
TClingClassInfo* TClinginfoBase = (TClingClassInfo*) base;
// Offset to the class itself.
if (TClinginfo->GetDecl() == TClinginfoTarget->GetDecl()) {
if (TClinginfo->GetDecl() == TClinginfoBase->GetDecl()) {
return 0;
}
return TClinginfo->GetBaseOffset(TClinginfoTarget, address);
return TClinginfo->GetBaseOffset(TClinginfoBase, address);
}

//______________________________________________________________________________
Expand Down
2 changes: 1 addition & 1 deletion core/meta/src/TCling.h
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ class TCling : public TInterpreter {
virtual ClassInfo_t* ClassInfo_Factory() const;
virtual ClassInfo_t* ClassInfo_Factory(ClassInfo_t* cl) const;
virtual ClassInfo_t* ClassInfo_Factory(const char* name) const;
virtual Long_t ClassInfo_GetBaseOffset(ClassInfo_t* derived, ClassInfo_t* target, void * address) const;
virtual Long_t ClassInfo_GetBaseOffset(ClassInfo_t* derived, ClassInfo_t* base, void * address) const;
virtual int ClassInfo_GetMethodNArg(ClassInfo_t* info, const char* method, const char* proto, Bool_t objectIsConst = false, ROOT::EFunctionMatchMode mode = ROOT::kConversionMatch) const;
virtual bool ClassInfo_HasDefaultConstructor(ClassInfo_t* info) const;
virtual bool ClassInfo_HasMethod(ClassInfo_t* info, const char* name) const;
Expand Down