Add payload to evm_result (stupid name)

This commit is contained in:
Paweł Bylica 2017-04-27 00:51:12 +02:00
parent d51700afa7
commit 3ddd4fdc18
2 changed files with 8 additions and 7 deletions

View File

@ -1,6 +1,7 @@
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <evm.h>
#include "evm.h"
@ -93,7 +94,7 @@ static struct evm_result execute(struct evm_instance* instance,
ret.output_data = output_data;
ret.output_size = address_size;
ret.release = &free_result_output_data;
ret.context = NULL; // We don't need another pointer.
ret.payload.pointer = NULL; // We don't need another pointer.
return ret;
}
else if (code_size == strlen(counter) &&

View File

@ -169,12 +169,12 @@ struct evm_result {
/// function to the result itself allows EVM composition.
evm_release_result_fn release;
/// The optional pointer to an internal EVM context.
///
/// This field MAY be used by _EVM implementations_ to store additional
/// result context (e.g. memory buffers). The pointer value MUST NOT
/// be accessed nor changed by EVM users.
void* context;
/// Reserved data to be optionally used by implementations.
union {
uint8_t bytes[24];
struct evm_uint160be address;
void* pointer;
} payload;
};
/// The query callback key.