aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/parser.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2024-09-13 01:31:49 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2024-09-13 01:49:22 +0200
commita9224ebee3b6458dee42d76ec76b1a704e206107 (patch)
tree5582c794f37cd092a987ce8dc9ae49723d46a1a0 /src/parser.h
parentc2057ebf7e2a34eccd615a7d88085e247e5b9e9f (diff)
downloadsciteco-a9224ebee3b6458dee42d76ec76b1a704e206107.tar.gz
remaining types of program counters changed to gsize/gssize
* This fixes F< to the beginning of the macro, which was broken in 73d574b71a10d4661ada20275cafde75aff6c1ba. teco_machine_main_t::macro_pc actually has to be signed as it is sometimes set to -1.
Diffstat (limited to 'src/parser.h')
-rw-r--r--src/parser.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/parser.h b/src/parser.h
index 0303bae..7cc286e 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -38,7 +38,7 @@ typedef struct {
/** how many iterations are left */
teco_int_t counter;
/** Program counter of loop start command */
- guint pc : sizeof(guint)*8 - 1;
+ gsize pc : sizeof(gsize)*8 - 1;
/**
* Whether the loop represents an argument
* barrier or not (it "passes through"
@@ -432,7 +432,8 @@ typedef enum {
struct teco_machine_main_t {
teco_machine_t parent;
- gsize macro_pc;
+ /* signed because it is sometimes set to -1 for flow control */
+ gssize macro_pc;
/**
* Aliases bitfield with an integer.