-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add support for an external interpreter #346
base: main
Are you sure you want to change the base?
Conversation
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.
clang-tidy made some suggestions
fe324fa
to
95bd490
Compare
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.
clang-tidy made some suggestions
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #346 +/- ##
==========================================
+ Coverage 74.43% 74.47% +0.03%
==========================================
Files 8 8
Lines 3204 3208 +4
==========================================
+ Hits 2385 2389 +4
Misses 819 819
... and 1 file with indirect coverage changes
|
void UseExternalInterpreter(TInterp_t I) { | ||
assert(sInterpreter && "sInterpreter already in use!"); | ||
sInterpreter = static_cast<compat::Interpreter*>(I); | ||
OwningSInterpreter = false; |
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.
Can we write a test for this?
95bd490
to
59a16a2
Compare
The new interface can be called by an external library like ROOT, that manages it's own `TInterpreter` instance. In this case the `cling::Interpreter*` initialised by TCling is passed to InterOp and a flag indicates that InterOp does not have ownership
417bcd7
to
002ba81
Compare
|
||
EXPECT_NE(ExtInterp, nullptr); | ||
Cpp::UseExternalInterpreter(ExtInterp); | ||
EXPECT_FALSE(Cpp::OwnsInterpreter()); |
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 don't need this probably. We can delete ExtInterp
and write a death test.
5935eaf
to
2996beb
Compare
2996beb
to
abe0d5a
Compare
The new interface can be called by an external library like ROOT, that manages it's own
TInterpreter
instance. In this case thecling::Interpreter*
initialized by TCling is passed to InterOp and a flag indicates that InterOp does not have ownership