-
Notifications
You must be signed in to change notification settings - Fork 314
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
java: remove the extra wrapping of HostContext and pass it directly #550
Conversation
@@ -11,11 +11,6 @@ | |||
extern "C" { | |||
#endif | |||
|
|||
struct evmc_host_context |
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.
The whole point of evmc_host_context
is to be an opaque object from the interface perspective, and since it only needs to be valid during the scope of execute
I think this change is the correct one.
I think that's ok, not sure I grasp it entirely. I thought the point of having this organization was to pass the context when doing internal calls, but I think you're saying that's not necessary. |
The context is needed for all the host functions, just that we can opaquely pass it around I think. We can only make this simplification because the scope is limited. |
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.
Looks nice. I assume that an HostContext
object is not going to be garbage collected while being the argument of execute()
.
That is my assumption. We are safe to do this because |
57cccf6
to
4b24898
Compare
40124d0
to
0aaef0e
Compare
0aaef0e
to
1e9bcc9
Compare
Depends on #549.