-
Notifications
You must be signed in to change notification settings - Fork 309
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
Host example #116
Host example #116
Conversation
c7ddcf2
to
b86f745
Compare
test/vmtester/tests.cpp
Outdated
// Declarations of functions from example host: | ||
|
||
evmc_context* example_host_create_context(); | ||
void example_host_destroy_context(evmc_context* 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.
Why not create a header for it now?
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.
I don't want it to be a part of the example.
}; | ||
|
||
/// Example how the API is supposed to be used. | ||
int main() |
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.
I think this part should stay.
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.
Will do: #118
I have idea how to more improve examples, but need to move some files. I'd prefer in following PRs.
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.
Would it be hard to keep it in this PR? It should just use the context from example-host
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.
This is done. What next?
4d7444b
to
d697018
Compare
Done except it does not work now. |
Needs #119 |
This may be nitpicking, but I'd like to have |
Good now? |
I meant I can do it on a different branch if you want to have a look at it? |
No, I will do it. |
Actually I did it in ab480f2. It will not work because changes are too big. |
Tried myself, it seems even if it is a git move, it thinks the diff is too large and just keeps it as delete/create. |
I can add intermediate commit to have it. |
|
||
evmc_uint256be balance(evmc_context* context, const evmc_address* address) | ||
static evmc_uint256be balance(evmc_context* context, const evmc_address* address) |
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.
Not relevant to this PR, but I guess if this is .cpp
we should use an anonymous namespace instead?
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.
I'm trying to stay in C dialect as much as possible.
Would be nice in order to see the actual changes in |
I have it, at least locally: 98213f9#diff-ca5036d6b23291fb8dcac8244c1bc9a6 For some reason GitHub does not show the history of example.c, but my git does. |
It does have the move now. Github doesn't have |
Fixes #110.