Add support for BPF program custom errors (#5743)

* Add support for BPF program custom errors

* Rename SOL_SUCCESS -> SUCCESS
This commit is contained in:
Justin Starry
2019-09-06 16:05:01 -07:00
committed by GitHub
parent d3052d094c
commit 81c36699c4
26 changed files with 108 additions and 67 deletions

View File

@ -51,6 +51,11 @@ static_assert(sizeof(uint64_t) == 8);
*/
#define NULL 0
/**
* SUCCESS return value
*/
#define SUCCESS 0
/**
* Boolean type
*/
@ -319,9 +324,9 @@ SOL_FN_PREFIX void sol_log_params(const SolParameters *params) {
* Program instruction entrypoint
*
* @param input Buffer of serialized input parameters. Use sol_deserialize() to decode
* @return true if the instruction executed successfully
* @return 0 if the instruction executed successfully
*/
bool entrypoint(const uint8_t *input);
uint32_t entrypoint(const uint8_t *input);
#ifdef SOL_TEST