 [ 1.0 2.0 3.0 4.0 ]
 [ 1.0 2.0 3.0 4.0 <double-rect> double-rect-test >double-rect< ] unit-test
 
-C-STRUCT: test_struct_14
-{ "double" "x1" }
-{ "double" "x2" } ;
+STRUCT: test_struct_14
+    { x1 float }
+    { x2 float } ;
 
 FUNCTION: test_struct_14 ffi_test_40 ( double x1, double x2 ) ;
 
 [ 1.0 2.0 ] [
-    1.0 2.0 ffi_test_40
-    [ test_struct_14-x1 ] [ test_struct_14-x2 ] bi
+    1.0 2.0 ffi_test_40 [ x1>> ] [ x2>> ] bi
 ] unit-test
 
 : callback-10 ( -- callback )
     "test_struct_14" { "double" "double" } "cdecl"
     [
-        "test_struct_14" <c-object>
-        [ set-test_struct_14-x2 ] keep
-        [ set-test_struct_14-x1 ] keep
+        test_struct_14 <struct>
+            swap >>x2
+            swap >>x1
     ] alien-callback ;
 
 : callback-10-test ( x1 x2 callback -- result )

] unit-test

! Reported by jedahu
C-STRUCT: bool-field-test
   { "char*" "name" }
   { "bool"  "on" }
   { "short" "parents" } ;

FUNCTION: short ffi_test_48 ( bool-field-test x ) ;

[ 123 ] [
    "bool-field-test" <c-object> 123 over set-bool-field-test-parents
    ffi_test_48
] unit-test


[ 1.0 2 ] [
    1.0 2 callback-13 callback-13-test
    [ x>> ] [ a>> ] bi
] unit-test

FUNCTION: test_struct_14 ffi_test_44 ( ) ; inline

[ 1.0 2.0 ] [ ffi_test_44 [ x1>> ] [ x2>> ] bi ] unit-test

: stack-frame-bustage ( -- a b ) ffi_test_44 gc 3 ;

