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:
2024-04-25 10:48:51 +05:30
parent 159501168c
commit 1dfdbb3cd0
10 changed files with 39 additions and 38 deletions

View File

@@ -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, ", ");