Refactor type byte -> byte_t
Simpler to read as a type. This style will allow me to define signed versions of the base types as simpler names than what they are currently.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
|
||||
#include "./struct.h"
|
||||
|
||||
void vm_load_stack(vm_t *vm, byte *bytes, size_t size)
|
||||
void vm_load_stack(vm_t *vm, byte_t *bytes, size_t size)
|
||||
{
|
||||
vm->stack.data = bytes;
|
||||
vm->stack.max = size;
|
||||
@@ -139,7 +139,7 @@ void vm_print_stack(vm_t *vm, FILE *fp)
|
||||
printf("\n");
|
||||
for (size_t i = stack.ptr; i > 0; --i)
|
||||
{
|
||||
byte b = stack.data[i - 1];
|
||||
byte_t b = stack.data[i - 1];
|
||||
fprintf(fp, "\t%lu: %X", stack.ptr - i, b);
|
||||
if (i != 1)
|
||||
fprintf(fp, ", ");
|
||||
|
||||
Reference in New Issue
Block a user