Skip to content

Commit

Permalink
resolve class object's type using Cppyy::GetActualClass
Browse files Browse the repository at this point in the history
  • Loading branch information
Vipul-Cariappa authored and aaronj0 committed Jan 19, 2025
1 parent f82be28 commit 45ebc49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Cppyy.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ namespace Cppyy {
CPPYY_IMPORT
TCppScope_t GetGlobalScope();
CPPYY_IMPORT
TCppType_t GetActualClass(TCppType_t klass, TCppObject_t obj);
TCppScope_t GetActualClass(TCppScope_t klass, TCppObject_t obj);
CPPYY_IMPORT
size_t SizeOf(TCppScope_t klass);
CPPYY_IMPORT
Expand Down
2 changes: 1 addition & 1 deletion src/ProxyWrappers.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ PyObject* CPyCppyy::BindCppObject(Cppyy::TCppObject_t address,
// TODO: optimize for final classes
unsigned new_flags = flags;
if (!isRef && (gPinnedTypes.empty() || gPinnedTypes.find(klass) == gPinnedTypes.end())) {
Cppyy::TCppType_t clActual = klass /* XXX: Cppyy::GetActualClass(klass, address) */;
Cppyy::TCppType_t clActual = Cppyy::GetActualClass(klass, address);

if (clActual) {
if (clActual != klass) {
Expand Down

0 comments on commit 45ebc49

Please sign in to comment.