Skip to content
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

C++: Add basic types based on C types #357

Merged
merged 9 commits into from
Jul 23, 2019
Merged

C++: Add basic types based on C types #357

merged 9 commits into from
Jul 23, 2019

Conversation

chfast
Copy link
Member

@chfast chfast commented Jul 22, 2019

The basic types address and bytes32 have received their C++ wrappers to assure they are always initialized. They also have convenient operator overloadings for comparison and usage as keys in standard containers.

Closes #352

@chfast chfast force-pushed the cpp_basic_types branch 2 times, most recently from 4f71fe0 to ad2be01 Compare July 22, 2019 10:37
@axic
Copy link
Member

axic commented Jul 22, 2019

Some of this is duplicated in helpers.hpp.

@chfast
Copy link
Member Author

chfast commented Jul 22, 2019

Some of this is duplicated in helpers.hpp.

The helpers.hpp will be deprecated or removed.

@axic
Copy link
Member

axic commented Jul 22, 2019

Some of this is duplicated in helpers.hpp.
The helpers.hpp will be deprecated or removed.

Why not move stuff in this PR properly?

@chfast
Copy link
Member Author

chfast commented Jul 22, 2019

Why not move stuff in this PR properly?

Will be done in this PR.

@chfast chfast force-pushed the cpp_basic_types branch 7 times, most recently from 8b4ea41 to 02cfbe2 Compare July 22, 2019 13:49
@chfast chfast marked this pull request as ready for review July 22, 2019 13:50
@chfast chfast requested review from axic and gumb0 July 22, 2019 13:50
@chfast chfast added this to In progress in v6.3 via automation Jul 22, 2019
@chfast chfast force-pushed the cpp_basic_types branch 2 times, most recently from 5f104ec to e85c1c1 Compare July 22, 2019 14:38
@chfast chfast mentioned this pull request Jul 23, 2019
@chfast
Copy link
Member Author

chfast commented Jul 23, 2019

Ready.

{
using namespace evmc;
using namespace fnv;
return static_cast<size_t>(fnv1a_by64(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this would truncate to the lower 32 bits on a 32-bit machine?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

v6.3 automation moved this from In progress to Reviewer approved Jul 23, 2019
@chfast chfast merged commit 5c55ac5 into master Jul 23, 2019
v6.3 automation moved this from Reviewer approved to Done Jul 23, 2019
@chfast chfast deleted the cpp_basic_types branch July 23, 2019 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
v6.3
  
Done
Development

Successfully merging this pull request may close these issues.

C++: Add aliases for basic structs
2 participants