From 3ebd13da5bba17b4296fc93b76ed93b897dd5b21 Mon Sep 17 00:00:00 2001 From: Vipul Cariappa Date: Tue, 18 Feb 2025 19:16:22 +0530 Subject: [PATCH 1/2] collect all enum constants while constructing class dict --- clingwrapper/src/clingwrapper.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/clingwrapper/src/clingwrapper.cxx b/clingwrapper/src/clingwrapper.cxx index f35739d2..220002f5 100644 --- a/clingwrapper/src/clingwrapper.cxx +++ b/clingwrapper/src/clingwrapper.cxx @@ -1656,6 +1656,7 @@ void Cppyy::GetDatamembers(TCppScope_t scope, std::vector& datamemb { Cpp::GetDatamembers(scope, datamembers); Cpp::GetStaticDatamembers(scope, datamembers); + Cpp::GetEnumConstantDatamembers(scope, datamembers, false); } bool Cppyy::CheckDatamember(TCppScope_t scope, const std::string& name) { From f42c88e195a222d50c90ab0d72ad25521631454c Mon Sep 17 00:00:00 2001 From: Vipul Cariappa Date: Tue, 18 Feb 2025 19:17:16 +0530 Subject: [PATCH 2/2] add `IsFunctionPointerType` function --- clingwrapper/src/clingwrapper.cxx | 4 ++++ clingwrapper/src/cpp_cppyy.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/clingwrapper/src/clingwrapper.cxx b/clingwrapper/src/clingwrapper.cxx index 220002f5..0140370d 100644 --- a/clingwrapper/src/clingwrapper.cxx +++ b/clingwrapper/src/clingwrapper.cxx @@ -463,6 +463,10 @@ bool Cppyy::IsClassType(TCppType_t type) { return Cpp::IsRecordType(type); } +bool Cppyy::IsFunctionPointerType(TCppType_t type) { + return Cpp::IsFunctionPointerType(type); +} + // returns true if no new type was added. bool Cppyy::AppendTypesSlow(const std::string &name, std::vector& types) { diff --git a/clingwrapper/src/cpp_cppyy.h b/clingwrapper/src/cpp_cppyy.h index 60b6005a..ba03c8e1 100644 --- a/clingwrapper/src/cpp_cppyy.h +++ b/clingwrapper/src/cpp_cppyy.h @@ -84,6 +84,8 @@ namespace Cppyy { RPY_EXPORTED bool IsClassType(TCppType_t type); RPY_EXPORTED + bool IsFunctionPointerType(TCppType_t type); + RPY_EXPORTED TCppType_t GetType(const std::string &name, bool enable_slow_lookup = false); RPY_EXPORTED bool AppendTypesSlow(const std::string &name,