-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
cppyy does not retrieve correct size of type when pythonizing vector #11596
Comments
This was the original cause for #11581 |
I may be missing the point here, but to me it seems Cling is doing exactly what you ask it to do: |
Indeed, it's a bit more subtle. There is a pythonization happening here, which transforms the type given by |
The issue seems to be with this line in particular: const std::string& vtype = Cppyy::ResolveName(name+"::value_type");
size_t typesz = Cppyy::SizeOf(vtype); In the reproducer case, this is equivalent to calling In root [0] auto cl = TClass::GetClass("const char *", true, true);
root [1] cl
(TClass *) nullptr Thus, the final result of the initial call to In upstream cppyy, this is fixed by calling So this should be done in our cppyy too. Reassigning the issue to me, it's not related to cling but cppyy itself |
std::vector<const char*>::value_type
is nullptr
Since this is fixed upstream, this will the fixed by the cppyy sync PR: |
Hi @guitargeek, @vepadulano, It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise. Sincerely, |
Whereas it should return the correct
const char*
type https://godbolt.org/z/a3s95cex3Setup
ROOT master and 6.26
Fedora 36
GCC 12
Feel free to change assignees if needed
The text was updated successfully, but these errors were encountered: