From: Mike Lowis Date: Thu, 9 Jan 2025 19:52:20 +0000 (-0500) Subject: add accessor function for testing X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=86e9529abe96cec0c2586cf1611312a782705469;p=proto%2Fcerise-c.git add accessor function for testing --- diff --git a/Records.c b/Records.c index b272c6b..a8bfb1e 100644 --- a/Records.c +++ b/Records.c @@ -2,6 +2,7 @@ typedef struct Records_Rec1 Records_Rec1; typedef struct Records_Rec2 Records_Rec2; +int Records_GetFoo(Rec1*); struct Records_Rec1 { int foo; @@ -11,3 +12,8 @@ struct Records_Rec2 { int bar; Records_Rec2* baz; }; +int Records_GetFoo(Rec1* a) { + int _t0 = (a->foo); + return _t0; +} + diff --git a/Records.m b/Records.m index 614fe02..3b33d94 100644 --- a/Records.m +++ b/Records.m @@ -7,4 +7,8 @@ Rec1 is record { Rec2 is record (Rec1) { bar = int baz = Rec2 +} + +GetFoo(a : Rec1) { + return a.foo } \ No newline at end of file