You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting access to protected data members when inheriting from a C++ stopped working (for protected functions it still works).
Reproducer
importcppyycppyy.cppdef("""class MyBaseClass {public: virtual ~MyBaseClass() = default;protected: int protectedFunc() { return 5; } int _protectedData = 4;};""")
classMyDerivedClass(cppyy.gbl.MyBaseClass):
passmy_obj=MyDerivedClass()
print(my_obj.protectedFunc()) # works!print(my_obj._protectedData) # doesn't work with ROOT 6.32!
The reproducer fails on lxplus9 with ROOT 6.32.06 and Python 3.9.18
5
Traceback (most recent call last):
File "/afs/cern.ch/user/r/rembserj/repro.py", line 21, in <module>
print(my_obj._protectedData) # doesn't work!
AttributeError: 'MyDerivedClass' object has no attribute '_protectedData'
However, on lxplus8 with ROOT 6.30/08 and Python 3.6.8, it works.
ROOT version
ROOT >=6.32.00
Installation method
Any
Operating system
Any
Additional context
The priority of this issue is set to low, since I'm not aware of any people making use of that feature. The 6.32 release cycle came and went without any complaints at least.
The text was updated successfully, but these errors were encountered:
pcanal
changed the title
[Python] Regression in accessing proteced data members in ROOT 6.32 after cppyy upgrade
[Python] Regression in accessing protected data members in ROOT 6.32 after cppyy upgrade
Nov 7, 2024
Check duplicate issues.
Description
Getting access to protected data members when inheriting from a C++ stopped working (for protected functions it still works).
Reproducer
The reproducer fails on
lxplus9
with ROOT 6.32.06 and Python 3.9.18However, on
lxplus8
with ROOT 6.30/08 and Python 3.6.8, it works.ROOT version
ROOT >=6.32.00
Installation method
Any
Operating system
Any
Additional context
The priority of this issue is set to low, since I'm not aware of any people making use of that feature. The 6.32 release cycle came and went without any complaints at least.
The text was updated successfully, but these errors were encountered: