From 7ee7774ef3cd5bc1c4286e0f9a13bc137a23247d Mon Sep 17 00:00:00 2001 From: maximusron Date: Thu, 19 Sep 2024 13:15:40 +0200 Subject: [PATCH] Make GetDataMember use an out param --- clingwrapper/src/clingwrapper.cxx | 5 +++-- clingwrapper/src/cpp_cppyy.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/clingwrapper/src/clingwrapper.cxx b/clingwrapper/src/clingwrapper.cxx index 8c22066c..91be004e 100644 --- a/clingwrapper/src/clingwrapper.cxx +++ b/clingwrapper/src/clingwrapper.cxx @@ -1627,9 +1627,10 @@ bool Cppyy::IsStaticMethod(TCppMethod_t method) // return (TCppIndex_t)0; // unknown class? // } -std::vector Cppyy::GetDatamembers(TCppScope_t scope) +void Cppyy::GetDatamembers(TCppScope_t scope, std::vector& datamembers) { - return Cpp::GetDatamembers(scope); + Cpp::GetDatamembers(scope, datamembers); + Cpp::GetStaticDatamembers(scope, datamembers); } bool Cppyy::CheckDatamember(TCppScope_t scope, const std::string& name) { diff --git a/clingwrapper/src/cpp_cppyy.h b/clingwrapper/src/cpp_cppyy.h index 2af7e8d2..579ff1bf 100644 --- a/clingwrapper/src/cpp_cppyy.h +++ b/clingwrapper/src/cpp_cppyy.h @@ -334,7 +334,7 @@ namespace Cppyy { // RPY_EXPORTED // TCppIndex_t GetNumDatamembers(TCppScope_t scope, bool accept_namespace = false) { return 0; } RPY_EXPORTED - std::vector GetDatamembers(TCppScope_t scope); + void GetDatamembers(TCppScope_t scope, std::vector& datamembers); // GetDatamemberName is unused. // RPY_EXPORTED // std::string GetDatamemberName(TCppScope_t scope, TCppIndex_t idata) { return ""; }