-
Notifications
You must be signed in to change notification settings - Fork 31
Resolve static attributes of records #322
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
@vgvassilev, Should this change be extracted to a separate function |
I think it is better to make this a separate interface, but we don't need changes in CPyCppyy. Since clingwrapper currently expects static data members with this interface we can stack the results of |
clang-tidy review says "All clean, LGTM! 👍" |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #322 +/- ##
==========================================
+ Coverage 73.69% 73.71% +0.01%
==========================================
Files 8 8
Lines 3019 3021 +2
==========================================
+ Hits 2225 2227 +2
Misses 794 794
|
The failing tests need to be fixed in cppyy with the following patch: diff --git a/python/cppyy/__init__.py b/python/cppyy/__init__.py
index 53b7e92..c5d7a3b 100644
--- a/python/cppyy/__init__.py
+++ b/python/cppyy/__init__.py
@@ -133,6 +133,7 @@ def _standard_pythonizations(pyclass, name):
return other == -1 or int(self) == other
def __ne__(self, other):
return other != -1 and int(self) != other
+ del pyclass.__class__.npos # drop b/c is const data
pyclass.npos = NPOS(pyclass.npos)
return True Taken from master. |
clang-tidy review says "All clean, LGTM! 👍" |
lib/Interpreter/CppInterOp.cpp
Outdated
return datamembers; | ||
} | ||
|
||
return {}; | ||
} | ||
|
||
std::vector<TCppScope_t> GetStaticDatamembers(TCppScope_t scope) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should pass the std::vector as an out parameter.
clang-tidy review says "All clean, LGTM! 👍" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! @aaronj0, what do you think?
Fixes: test04_class_read_access and test05_class_data_write_access with one-liner change in cppyy.