-
Notifications
You must be signed in to change notification settings - Fork 100
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
PythonPlugin: replace deprecated/removed Eval with Exec #1349
Conversation
It doesn't matter because we don't care about the result
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.
Hi Andre, conditional compilation is probably better:
#include <RVersion.h>
....
#if ROOT_VERSION_CODE < ROOT_VERSION(6,35,1)
TPython::Eval(c.second.c_str());
#else
TPython::Exec(c.second.c_str());
#endif
The Exec exists and we use it in the different case, so this will always compile. |
I was doing the same changes yesterday.
|
Admittedly I just took the advice in the ROOT doc at face value to just use Exec instead of eval. But since we didn't look at the returned value before, it all boils down to https://github.com/root-project/root/blob/v6-34-00-patches/bindings/tpython/src/TPython.cxx#L465
and
Which is equivalent. The rest of the functions are just treating the output, are they not? And if we don't compile conditionally we make this change dependent on the DD4hep version, and not the ROOT version behind it. Which is maybe better to spot errors if things turn out to be different in the end? |
I think it is OK. There is anyhow no other choice. |
Test Results 14 files 14 suites 6h 35m 33s ⏱️ Results for commit 31d4a30. |
Hi @smuzaffar, Any preference? |
I have no preference. If |
It doesn't matter because we don't care about the result
BEGINRELEASENOTES
ENDRELEASENOTES