-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat: add C version of CPI program #6
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.
Looks great! Just one little nit. Can you also add cpi
to the list of C programs for CI at
program: [helloworld, transfer-lamports] |
cpi/c/src/main.c
Outdated
uint8_t data[4 + 8]; | ||
*(uint16_t *)data = 8; | ||
*(uint64_t *)(data + 4) = SIZE; |
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.
nit: Can you add the comments from the original here?
uint8_t data[4 + 8]; | |
*(uint16_t *)data = 8; | |
*(uint64_t *)(data + 4) = SIZE; | |
uint8_t data[4 + 8]; // Enough room for the Allocate instruction | |
*(uint16_t *)data = 8; // Allocate instruction enum value | |
*(uint64_t *)(data + 4) = SIZE; // Size to allocate |
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.
added 7559567
my bad 7559567 |
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.
Thanks for the contribution again!
No description provided.