diff --git a/compiler/test.capnp b/compiler/test.capnp index 42e2481..9c65721 100644 --- a/compiler/test.capnp +++ b/compiler/test.capnp @@ -503,107 +503,6 @@ struct TestWholeFloatDefault { const bigConstant :Float32 = 4e30; } -struct TestGenerics(Foo, Bar) { - foo @0 :Foo; - rev @1 :TestGenerics(Bar, Foo); - - struct Inner { - foo @0 :Foo; - bar @1 :Bar; - } - - struct Inner2(Baz) { - bar @0 :Bar; - baz @1 :Baz; - innerBound @2 :Inner; - innerUnbound @3 :TestGenerics.Inner; - - struct DeepNest(Qux) { - foo @0 :Foo; - bar @1 :Bar; - baz @2 :Baz; - qux @3 :Qux; - } - } - - interface Interface(Qux) { - call @0 Inner2(Text) -> (qux :Qux, gen :TestGenerics(TestAllTypes, TestAnyPointer)); - } - - annotation ann(struct) :Foo; - - using AliasFoo = Foo; - using AliasInner = Inner; - using AliasInner2 = Inner2; - using AliasInner2Text = Inner2(Text); - using AliasRev = TestGenerics(Bar, Foo); - - struct UseAliases { - foo @0 :AliasFoo; - inner @1 :AliasInner; - inner2 @2 :AliasInner2; - inner2Bind @3 :AliasInner2(Text); - inner2Text @4 :AliasInner2Text; - revFoo @5 :AliasRev.AliasFoo; - } -} - -struct TestGenericsWrapper(Foo, Bar) { - value @0 :TestGenerics(Foo, Bar); -} - -struct TestGenericsWrapper2 { - value @0 :TestGenericsWrapper(Text, TestAllTypes); -} - -interface TestImplicitMethodParams { - call @0 [T, U] (foo :T, bar :U) -> TestGenerics(T, U); -} - -interface TestImplicitMethodParamsInGeneric(V) { - call @0 [T, U] (foo :T, bar :U) -> TestGenerics(T, U); -} - -struct TestUseGenerics $TestGenerics(Text, Data).ann("foo") { - basic @0 :TestGenerics(TestAllTypes, TestAnyPointer); - inner @1 :TestGenerics(TestAllTypes, TestAnyPointer).Inner; - inner2 @2 :TestGenerics(TestAllTypes, TestAnyPointer).Inner2(Text); - unspecified @3 :TestGenerics; - unspecifiedInner @4 :TestGenerics.Inner2(Text); - wrapper @8 :TestGenericsWrapper(TestAllTypes, TestAnyPointer); - cap @18 :TestGenerics(TestInterface, Text); - genericCap @19 :TestGenerics(TestAllTypes, List(UInt32)).Interface(Data); - - default @5 :TestGenerics(TestAllTypes, Text) = - (foo = (int16Field = 123), rev = (foo = "text", rev = (foo = (int16Field = 321)))); - defaultInner @6 :TestGenerics(TestAllTypes, Text).Inner = - (foo = (int16Field = 123), bar = "text"); - defaultUser @7 :TestUseGenerics = (basic = (foo = (int16Field = 123))); - defaultWrapper @9 :TestGenericsWrapper(Text, TestAllTypes) = - (value = (foo = "text", rev = (foo = (int16Field = 321)))); - defaultWrapper2 @10 :TestGenericsWrapper2 = - (value = (value = (foo = "text", rev = (foo = (int16Field = 321))))); - - aliasFoo @11 :TestGenerics(TestAllTypes, TestAnyPointer).AliasFoo = (int16Field = 123); - aliasInner @12 :TestGenerics(TestAllTypes, TestAnyPointer).AliasInner - = (foo = (int16Field = 123)); - aliasInner2 @13 :TestGenerics(TestAllTypes, TestAnyPointer).AliasInner2 - = (innerBound = (foo = (int16Field = 123))); - aliasInner2Bind @14 :TestGenerics(TestAllTypes, TestAnyPointer).AliasInner2(List(UInt32)) - = (baz = [12, 34], innerBound = (foo = (int16Field = 123))); - aliasInner2Text @15 :TestGenerics(TestAllTypes, TestAnyPointer).AliasInner2Text - = (baz = "text", innerBound = (foo = (int16Field = 123))); - aliasRev @16 :TestGenerics(TestAnyPointer, Text).AliasRev.AliasFoo = "text"; - - useAliases @17 :TestGenerics(TestAllTypes, List(UInt32)).UseAliases = ( - foo = (int16Field = 123), - inner = (foo = (int16Field = 123)), - inner2 = (innerBound = (foo = (int16Field = 123))), - inner2Bind = (baz = "text", innerBound = (foo = (int16Field = 123))), - inner2Text = (baz = "text", innerBound = (foo = (int16Field = 123))), - revFoo = [12, 34, 56]); -} - struct TestEmptyStruct {} struct TestConstants { @@ -697,96 +596,6 @@ const derivedConstant :TestAllTypes = ( int16List = TestConstants.int16ListConst, structList = TestConstants.structListConst); -const genericConstant :TestGenerics(TestAllTypes, Text) = - (foo = (int16Field = 123), rev = (foo = "text", rev = (foo = (int16Field = 321)))); - -interface TestInterface { - foo @0 (i :UInt32, j :Bool) -> (x :Text); - bar @1 () -> (); - baz @2 (s: TestAllTypes); -} - -interface TestExtends extends(TestInterface) { - qux @0 (); - corge @1 TestAllTypes -> (); - grault @2 () -> TestAllTypes; -} - -interface TestExtends2 extends(TestExtends) {} - -interface TestPipeline { - getCap @0 (n: UInt32, inCap :TestInterface) -> (s: Text, outBox :Box); - testPointers @1 (cap :TestInterface, obj :AnyPointer, list :List(TestInterface)) -> (); - - struct Box { - cap @0 :TestInterface; - } -} - -interface TestCallOrder { - getCallSequence @0 (expected: UInt32) -> (n: UInt32); - # First call returns 0, next returns 1, ... - # - # The input `expected` is ignored but useful for disambiguating debug logs. -} - -interface TestTailCallee { - struct TailResult { - i @0 :UInt32; - t @1 :Text; - c @2 :TestCallOrder; - } - - foo @0 (i :Int32, t :Text) -> TailResult; -} - -interface TestTailCaller { - foo @0 (i :Int32, callee :TestTailCallee) -> TestTailCallee.TailResult; -} - -interface TestHandle {} - -interface TestMoreStuff extends(TestCallOrder) { - # Catch-all type that contains lots of testing methods. - - callFoo @0 (cap :TestInterface) -> (s: Text); - # Call `cap.foo()`, check the result, and return "bar". - - callFooWhenResolved @1 (cap :TestInterface) -> (s: Text); - # Like callFoo but waits for `cap` to resolve first. - - neverReturn @2 (cap :TestInterface) -> (capCopy :TestInterface); - # Doesn't return. You should cancel it. - - hold @3 (cap :TestInterface) -> (); - # Returns immediately but holds on to the capability. - - callHeld @4 () -> (s: Text); - # Calls the capability previously held using `hold` (and keeps holding it). - - getHeld @5 () -> (cap :TestInterface); - # Returns the capability previously held using `hold` (and keeps holding it). - - echo @6 (cap :TestCallOrder) -> (cap :TestCallOrder); - # Just returns the input cap. - - expectCancel @7 (cap :TestInterface) -> (); - # evalLater()-loops forever, holding `cap`. Must be canceled. - - methodWithDefaults @8 (a :Text, b :UInt32 = 123, c :Text = "foo") -> (d :Text, e :Text = "bar"); - - getHandle @9 () -> (handle :TestHandle); - # Get a new handle. Tests have an out-of-band way to check the current number of live handles, so - # this can be used to test garbage collection. -} - -interface TestKeywordMethods { - delete @0 (); - class @1 (); - void @2 (); - return @3 (); -} - struct TestSturdyRef { hostId @0 :TestSturdyRefHostId; objectId @1 :AnyPointer; @@ -847,6 +656,3 @@ struct TestNameAnnotation $Cxx.name("RenamedStruct") { } } -interface TestNameAnnotationInterface $Cxx.name("RenamedInterface") { - badlyNamedMethod @0 (badlyNamedParam :UInt8 $Cxx.name("renamedParam")) $Cxx.name("renamedMethod"); -} diff --git a/compiler/test.capnp.c b/compiler/test.capnp.c index 62d07d9..db7174c 100644 --- a/compiler/test.capnp.c +++ b/compiler/test.capnp.c @@ -2,1030 +2,19 @@ /* AUTO GENERATED - DO NOT EDIT */ static const capn_text capn_val0 = {0,""}; static const capn_ptr capn_null = {CAPN_NULL}; -static const uint8_t capn_buf[8168] = { +static const uint8_t capn_buf[64] = { 102,111,111,0,0,0,0,0, 98,97,114,0,0,0,0,0, - 1,244,128,13,14,16,76,251, - 78,115,232,56,166,51,0,0, - 90,0,210,4,20,136,98,3, - 210,10,111,18,33,25,204,4, - 95,112,9,175,2,0,0,0, - 0,0,0,0,0,144,117,64, - 77,0,0,0,34,0,0,0, - 77,0,0,0,26,0,0,0, - 76,0,0,0,6,0,20,0, - 29,109,174,255,24,0,0,0, - 33,1,0,0,41,0,0,0, - 33,1,0,0,34,0,0,0, - 33,1,0,0,35,0,0,0, - 33,1,0,0,36,0,0,0, - 37,1,0,0,37,0,0,0, - 49,1,0,0,34,0,0,0, - 49,1,0,0,35,0,0,0, - 49,1,0,0,36,0,0,0, - 53,1,0,0,37,0,0,0, - 65,1,0,0,52,0,0,0, - 73,1,0,0,53,0,0,0, - 93,1,0,0,30,0,0,0, - 113,1,0,0,30,0,0,0, - 133,1,0,0,119,2,0,0, - 213,2,0,0,27,0,0,0, - 0,0,0,0,0,0,0,0, - 98,97,122,0,0,0,0,0, - 113,117,120,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 77,0,0,0,58,0,0,0, - 0,0,0,0,0,0,0,0, - 72,0,0,0,6,0,20,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 110,101,115,116,101,100,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 77,0,0,0,114,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 114,101,97,108,108,121,32,110, - 101,115,116,101,100,0,0,0, - 26,0,0,0,0,0,0,0, - 12,222,128,127,0,0,0,0, - 210,4,210,233,0,128,255,127, - 78,97,188,0,64,211,160,250, - 0,0,0,128,255,255,255,127, - 121,223,13,134,72,112,0,0, - 46,117,19,253,138,150,253,255, - 0,0,0,0,0,0,0,128, - 255,255,255,255,255,255,255,127, - 12,34,0,255,0,0,0,0, - 210,4,46,22,0,0,255,255, - 78,97,188,0,192,44,95,5, - 0,0,0,0,255,255,255,255, - 121,223,13,134,72,112,0,0, - 210,138,236,2,117,105,2,0, - 0,0,0,0,0,0,0,0, - 255,255,255,255,255,255,255,255, - 0,0,0,0,56,180,150,73, - 194,189,240,124,194,189,240,252, - 234,28,8,2,234,28,8,130, - 0,0,0,0,0,0,0,0, - 64,222,119,131,33,18,220,66, - 41,144,35,202,229,200,118,127, - 41,144,35,202,229,200,118,255, - 145,247,80,55,158,120,102,0, - 145,247,80,55,158,120,102,128, - 9,0,0,0,42,0,0,0, - 9,0,0,0,50,0,0,0, - 9,0,0,0,58,0,0,0, - 113,117,117,120,0,0,0,0, - 99,111,114,103,101,0,0,0, - 103,114,97,117,108,116,0,0, - 9,0,0,0,50,0,0,0, - 9,0,0,0,42,0,0,0, - 9,0,0,0,34,0,0,0, - 103,97,114,112,108,121,0,0, - 119,97,108,100,111,0,0,0, - 102,114,101,100,0,0,0,0, - 12,0,0,0,6,0,20,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 29,1,0,0,122,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 189,0,0,0,122,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 93,0,0,0,122,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 120,32,115,116,114,117,99,116, - 108,105,115,116,32,49,0,0, - 120,32,115,116,114,117,99,116, - 108,105,115,116,32,50,0,0, - 120,32,115,116,114,117,99,116, - 108,105,115,116,32,51,0,0, - 3,0,1,0,6,0,0,0, 9,0,0,0,0,0,0,0, 111,145,0,0,0,0,0,0, 103,43,153,212,0,0,0,0, 199,107,159,6,57,148,96,249, 199,113,196,43,171,117,107,15, - 57,142,59,212,84,138,148,240, - 111,222,0,0,0,0,0,0, - 53,130,156,173,0,0,0,0, - 85,161,174,198,0,0,0,0, - 199,113,172,181,175,152,50,154, - 0,156,173,69,0,0,128,127, - 0,0,128,255,0,0,192,127, - 0,0,0,0,192,97,190,64, - 0,0,0,0,0,0,240,127, - 0,0,0,0,0,0,240,255, - 0,0,0,0,0,0,248,127, - 9,0,0,0,50,0,0,0, - 9,0,0,0,50,0,0,0, - 9,0,0,0,42,0,0,0, - 112,108,117,103,104,0,0,0, - 120,121,122,122,121,0,0,0, - 116,104,117,100,0,0,0,0, - 9,0,0,0,34,0,0,0, - 9,0,0,0,74,0,0,0, - 13,0,0,0,58,0,0,0, - 111,111,112,115,0,0,0,0, - 101,120,104,97,117,115,116,101, - 100,0,0,0,0,0,0,0, - 114,102,99,51,48,57,50,0, - 12,0,0,0,6,0,20,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 29,1,0,0,106,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 189,0,0,0,106,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 93,0,0,0,106,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 115,116,114,117,99,116,108,105, - 115,116,32,49,0,0,0,0, - 115,116,114,117,99,116,108,105, - 115,116,32,50,0,0,0,0, - 115,116,114,117,99,116,108,105, - 115,116,32,51,0,0,0,0, - 0,0,7,0,0,0,0,0, - 102,111,111,98,97,114,0,0, - 0,0,0,0,49,212,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,57,48,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 77,0,0,0,34,0,0,0, - 0,0,0,0,0,0,0,0, - 72,0,0,0,6,0,20,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 117,3,0,0,19,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 77,3,0,0,119,2,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 102,111,111,0,0,0,0,0, - 1,244,128,13,14,16,76,251, - 78,115,232,56,166,51,0,0, - 90,0,210,4,20,136,98,3, - 210,10,111,18,33,25,204,4, - 95,112,9,175,2,0,0,0, - 0,0,0,0,0,144,117,64, - 77,0,0,0,34,0,0,0, - 77,0,0,0,26,0,0,0, - 76,0,0,0,6,0,20,0, - 61,103,174,255,24,0,0,0, - 33,1,0,0,41,0,0,0, - 33,1,0,0,34,0,0,0, - 33,1,0,0,35,0,0,0, - 33,1,0,0,36,0,0,0, - 37,1,0,0,37,0,0,0, - 49,1,0,0,34,0,0,0, - 49,1,0,0,35,0,0,0, - 49,1,0,0,36,0,0,0, - 53,1,0,0,37,0,0,0, - 65,1,0,0,52,0,0,0, - 73,1,0,0,53,0,0,0, - 93,1,0,0,30,0,0,0, - 113,1,0,0,30,0,0,0, - 133,1,0,0,119,2,0,0, - 213,2,0,0,27,0,0,0, - 0,0,0,0,0,0,0,0, - 98,97,122,0,0,0,0,0, - 113,117,120,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 77,0,0,0,58,0,0,0, - 0,0,0,0,0,0,0,0, - 72,0,0,0,6,0,20,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 110,101,115,116,101,100,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 77,0,0,0,114,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 114,101,97,108,108,121,32,110, - 101,115,116,101,100,0,0,0, - 26,0,0,0,0,0,0,0, - 12,222,128,127,0,0,0,0, - 210,4,210,233,0,128,255,127, - 78,97,188,0,64,211,160,250, - 0,0,0,128,255,255,255,127, - 121,223,13,134,72,112,0,0, - 46,117,19,253,138,150,253,255, - 0,0,0,0,0,0,0,128, - 255,255,255,255,255,255,255,127, - 12,34,0,255,0,0,0,0, - 210,4,46,22,0,0,255,255, - 78,97,188,0,192,44,95,5, - 0,0,0,0,255,255,255,255, - 121,223,13,134,72,112,0,0, - 210,138,236,2,117,105,2,0, - 0,0,0,0,0,0,0,0, - 255,255,255,255,255,255,255,255, - 0,0,0,0,56,180,150,73, - 194,189,240,124,194,189,240,252, - 234,28,8,2,234,28,8,130, - 0,0,0,0,0,0,0,0, - 64,222,119,131,33,18,220,66, - 41,144,35,202,229,200,118,127, - 41,144,35,202,229,200,118,255, - 145,247,80,55,158,120,102,0, - 145,247,80,55,158,120,102,128, - 9,0,0,0,42,0,0,0, - 9,0,0,0,50,0,0,0, - 9,0,0,0,58,0,0,0, - 113,117,117,120,0,0,0,0, - 99,111,114,103,101,0,0,0, - 103,114,97,117,108,116,0,0, - 9,0,0,0,50,0,0,0, - 9,0,0,0,42,0,0,0, - 9,0,0,0,34,0,0,0, - 103,97,114,112,108,121,0,0, - 119,97,108,100,111,0,0,0, - 102,114,101,100,0,0,0,0, - 12,0,0,0,6,0,20,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 29,1,0,0,122,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 189,0,0,0,122,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 93,0,0,0,122,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 120,32,115,116,114,117,99,116, - 108,105,115,116,32,49,0,0, - 120,32,115,116,114,117,99,116, - 108,105,115,116,32,50,0,0, - 120,32,115,116,114,117,99,116, - 108,105,115,116,32,51,0,0, - 3,0,1,0,6,0,0,0, - 103,43,153,212,0,0,0,0, - 12,0,0,0,6,0,20,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 29,1,0,0,106,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 189,0,0,0,106,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 93,0,0,0,106,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 115,116,114,117,99,116,108,105, - 115,116,32,49,0,0,0,0, - 115,116,114,117,99,116,108,105, - 115,116,32,50,0,0,0,0, - 115,116,114,117,99,116,108,105, - 115,116,32,51,0,0,0,0, - 102,111,111,0,0,0,0,0, - 98,97,114,0,0,0,0,0, - 1,244,128,13,14,16,76,251, - 78,115,232,56,166,51,0,0, - 90,0,210,4,20,136,98,3, - 210,10,111,18,33,25,204,4, - 95,112,9,175,2,0,0,0, - 0,0,0,0,0,144,117,64, - 77,0,0,0,34,0,0,0, - 77,0,0,0,26,0,0,0, - 76,0,0,0,6,0,20,0, - 161,98,174,255,24,0,0,0, - 33,1,0,0,41,0,0,0, - 33,1,0,0,34,0,0,0, - 33,1,0,0,35,0,0,0, - 33,1,0,0,36,0,0,0, - 37,1,0,0,37,0,0,0, - 49,1,0,0,34,0,0,0, - 49,1,0,0,35,0,0,0, - 49,1,0,0,36,0,0,0, - 53,1,0,0,37,0,0,0, - 65,1,0,0,52,0,0,0, - 73,1,0,0,53,0,0,0, - 93,1,0,0,30,0,0,0, - 113,1,0,0,30,0,0,0, - 133,1,0,0,119,2,0,0, - 213,2,0,0,27,0,0,0, - 0,0,0,0,0,0,0,0, - 98,97,122,0,0,0,0,0, - 113,117,120,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 77,0,0,0,58,0,0,0, - 0,0,0,0,0,0,0,0, - 72,0,0,0,6,0,20,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 110,101,115,116,101,100,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 77,0,0,0,114,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 114,101,97,108,108,121,32,110, - 101,115,116,101,100,0,0,0, - 26,0,0,0,0,0,0,0, - 12,222,128,127,0,0,0,0, - 210,4,210,233,0,128,255,127, - 78,97,188,0,64,211,160,250, - 0,0,0,128,255,255,255,127, - 121,223,13,134,72,112,0,0, - 46,117,19,253,138,150,253,255, - 0,0,0,0,0,0,0,128, - 255,255,255,255,255,255,255,127, - 12,34,0,255,0,0,0,0, - 210,4,46,22,0,0,255,255, - 78,97,188,0,192,44,95,5, - 0,0,0,0,255,255,255,255, - 121,223,13,134,72,112,0,0, - 210,138,236,2,117,105,2,0, - 0,0,0,0,0,0,0,0, - 255,255,255,255,255,255,255,255, - 0,0,0,0,56,180,150,73, - 194,189,240,124,194,189,240,252, - 234,28,8,2,234,28,8,130, - 0,0,0,0,0,0,0,0, - 64,222,119,131,33,18,220,66, - 41,144,35,202,229,200,118,127, - 41,144,35,202,229,200,118,255, - 145,247,80,55,158,120,102,0, - 145,247,80,55,158,120,102,128, - 9,0,0,0,42,0,0,0, - 9,0,0,0,50,0,0,0, - 9,0,0,0,58,0,0,0, - 113,117,117,120,0,0,0,0, - 99,111,114,103,101,0,0,0, - 103,114,97,117,108,116,0,0, - 9,0,0,0,50,0,0,0, - 9,0,0,0,42,0,0,0, - 9,0,0,0,34,0,0,0, - 103,97,114,112,108,121,0,0, - 119,97,108,100,111,0,0,0, - 102,114,101,100,0,0,0,0, - 12,0,0,0,6,0,20,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 29,1,0,0,122,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 189,0,0,0,122,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 93,0,0,0,122,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 120,32,115,116,114,117,99,116, - 108,105,115,116,32,49,0,0, - 120,32,115,116,114,117,99,116, - 108,105,115,116,32,50,0,0, - 120,32,115,116,114,117,99,116, - 108,105,115,116,32,51,0,0, - 3,0,1,0,6,0,0,0, - 9,0,0,0,0,0,0,0, - 111,145,0,0,0,0,0,0, - 103,43,153,212,0,0,0,0, - 199,107,159,6,57,148,96,249, - 199,113,196,43,171,117,107,15, - 57,142,59,212,84,138,148,240, - 111,222,0,0,0,0,0,0, - 53,130,156,173,0,0,0,0, - 85,161,174,198,0,0,0,0, - 199,113,172,181,175,152,50,154, - 0,156,173,69,0,0,128,127, - 0,0,128,255,0,0,192,127, - 0,0,0,0,192,97,190,64, - 0,0,0,0,0,0,240,127, - 0,0,0,0,0,0,240,255, - 0,0,0,0,0,0,248,127, - 9,0,0,0,50,0,0,0, - 9,0,0,0,50,0,0,0, - 9,0,0,0,42,0,0,0, - 112,108,117,103,104,0,0,0, - 120,121,122,122,121,0,0,0, - 116,104,117,100,0,0,0,0, - 9,0,0,0,34,0,0,0, - 9,0,0,0,74,0,0,0, - 13,0,0,0,58,0,0,0, - 111,111,112,115,0,0,0,0, - 101,120,104,97,117,115,116,101, - 100,0,0,0,0,0,0,0, - 114,102,99,51,48,57,50,0, - 12,0,0,0,6,0,20,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 29,1,0,0,106,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 189,0,0,0,106,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 93,0,0,0,106,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 115,116,114,117,99,116,108,105, - 115,116,32,49,0,0,0,0, - 115,116,114,117,99,116,108,105, - 115,116,32,50,0,0,0,0, - 115,116,114,117,99,116,108,105, - 115,116,32,51,0,0,0,0, - 0,0,7,0,0,0,0,0, - 3,0,3,0,4,0,1,0, - 65,1,0,0,0,0,0,0, - 0,123,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,55,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 135,75,107,93,84,220,43,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 7,0,11,0,0,0,3,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 1,0,0,0,0,0,0,0, - 0,0,0,0,78,97,188,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 1,0,0,0,34,0,0,0, - 102,111,111,0,0,0,0,0, - 123,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 98,97,122,0,0,0,0,0 + 57,142,59,212,84,138,148,240 }; -static const struct capn_segment capn_seg = {{0},0,0,0,(char*)&capn_buf[0],8168,8168}; +static const struct capn_segment capn_seg = {{0},0,0,0,(char*)&capn_buf[0],64,64}; +union capn_conv_f32 TestWholeFloatDefault_constant = {0x43e40000u}; +union capn_conv_f32 TestWholeFloatDefault_bigConstant = {0x7249f2cau}; unsigned TestConstants_boolConst = 1; int8_t TestConstants_int8Const = -123; int16_t TestConstants_int16Const = -12345; @@ -1039,28 +28,29 @@ union capn_conv_f32 TestConstants_float32Const = {0x449a5000u}; union capn_conv_f64 TestConstants_float64Const = {((uint64_t) 0xc9b58b82u << 32) | 0xc0e0bb00u}; capn_text TestConstants_textConst = {3,(char*)&capn_buf[0],(struct capn_segment*)&capn_seg}; capn_data TestConstants_dataConst = {{2,0,0,0,1,0,3,(char*)&capn_buf[8],(struct capn_segment*)&capn_seg}}; -TestAllTypes_ptr TestConstants_structConst = {{1,0,0,0,48,20,0,(char*)&capn_buf[16],(struct capn_segment*)&capn_seg}}; +TestAllTypes_ptr TestConstants_structConst = {{1,1,0,0,48,20,0,(char*)&capn_buf[0],(struct capn_segment*)&capn_seg}}; enum TestEnum TestConstants_enumConst = (enum TestEnum) 5u; -capn_ptr TestConstants_voidListConst; -capn_list1 TestConstants_boolListConst = {{4,0,0,0,1,0,4,(char*)&capn_buf[1672],(struct capn_segment*)&capn_seg}}; -capn_list8 TestConstants_int8ListConst = {{2,0,0,0,1,0,2,(char*)&capn_buf[1680],(struct capn_segment*)&capn_seg}}; -capn_list16 TestConstants_int16ListConst = {{2,0,0,0,2,0,2,(char*)&capn_buf[1688],(struct capn_segment*)&capn_seg}}; -capn_list32 TestConstants_int32ListConst = {{2,0,0,0,4,0,2,(char*)&capn_buf[1696],(struct capn_segment*)&capn_seg}}; -capn_list64 TestConstants_int64ListConst = {{2,0,0,0,8,0,2,(char*)&capn_buf[1704],(struct capn_segment*)&capn_seg}}; -capn_list8 TestConstants_uint8ListConst = {{2,0,0,0,1,0,2,(char*)&capn_buf[1720],(struct capn_segment*)&capn_seg}}; -capn_list16 TestConstants_uint16ListConst = {{2,0,0,0,2,0,2,(char*)&capn_buf[1728],(struct capn_segment*)&capn_seg}}; -capn_list32 TestConstants_uint32ListConst = {{2,0,0,0,4,0,1,(char*)&capn_buf[1736],(struct capn_segment*)&capn_seg}}; -capn_list64 TestConstants_uint64ListConst = {{2,0,0,0,8,0,1,(char*)&capn_buf[1744],(struct capn_segment*)&capn_seg}}; -capn_list32 TestConstants_float32ListConst = {{2,0,0,0,4,0,4,(char*)&capn_buf[1752],(struct capn_segment*)&capn_seg}}; -capn_list64 TestConstants_float64ListConst = {{2,0,0,0,8,0,4,(char*)&capn_buf[1768],(struct capn_segment*)&capn_seg}}; -capn_ptr TestConstants_textListConst = {3,0,0,0,0,0,3,(char*)&capn_buf[1800],(struct capn_segment*)&capn_seg}; -capn_ptr TestConstants_dataListConst = {3,0,0,0,0,0,3,(char*)&capn_buf[1848],(struct capn_segment*)&capn_seg}; -TestAllTypes_list TestConstants_structListConst = {{2,0,0,1,48,20,3,(char*)&capn_buf[1912],(struct capn_segment*)&capn_seg}}; -capn_list16 TestConstants_enumListConst = {{2,0,0,0,2,0,2,(char*)&capn_buf[2584],(struct capn_segment*)&capn_seg}}; +capn_ptr TestConstants_voidListConst = {2,0,0,0,0,0,6,(char*)&capn_buf[16],(struct capn_segment*)&capn_seg}; +capn_list1 TestConstants_boolListConst = {{4,0,0,0,1,0,4,(char*)&capn_buf[16],(struct capn_segment*)&capn_seg}}; +capn_list8 TestConstants_int8ListConst = {{2,0,0,0,1,0,2,(char*)&capn_buf[24],(struct capn_segment*)&capn_seg}}; +capn_list16 TestConstants_int16ListConst = {{2,0,0,0,2,0,2,(char*)&capn_buf[32],(struct capn_segment*)&capn_seg}}; +capn_list32 TestConstants_int32ListConst = {{2,0,0,0,4,0,2,(char*)&capn_buf[40],(struct capn_segment*)&capn_seg}}; +capn_list64 TestConstants_int64ListConst = {{2,0,0,0,8,0,2,(char*)&capn_buf[48],(struct capn_segment*)&capn_seg}}; +capn_list8 TestConstants_uint8ListConst = {{2,1,0,0,1,0,2,(char*)&capn_buf[1664],(struct capn_segment*)&capn_seg}}; +capn_list16 TestConstants_uint16ListConst = {{2,1,0,0,2,0,2,(char*)&capn_buf[1680],(struct capn_segment*)&capn_seg}}; +capn_list32 TestConstants_uint32ListConst = {{2,1,0,0,4,0,1,(char*)&capn_buf[1696],(struct capn_segment*)&capn_seg}}; +capn_list64 TestConstants_uint64ListConst = {{2,1,0,0,8,0,1,(char*)&capn_buf[1712],(struct capn_segment*)&capn_seg}}; +capn_list32 TestConstants_float32ListConst = {{2,1,0,0,4,0,4,(char*)&capn_buf[1728],(struct capn_segment*)&capn_seg}}; +capn_list64 TestConstants_float64ListConst = {{2,1,0,0,8,0,4,(char*)&capn_buf[1752],(struct capn_segment*)&capn_seg}}; +capn_ptr TestConstants_textListConst = {3,1,0,0,0,0,3,(char*)&capn_buf[1792],(struct capn_segment*)&capn_seg}; +capn_ptr TestConstants_dataListConst = {3,1,0,0,0,0,3,(char*)&capn_buf[1848],(struct capn_segment*)&capn_seg}; +TestAllTypes_list TestConstants_structListConst = {{2,1,0,1,48,20,3,(char*)&capn_buf[1920],(struct capn_segment*)&capn_seg}}; +capn_list16 TestConstants_enumListConst = {{2,1,0,0,2,0,2,(char*)&capn_buf[2600],(struct capn_segment*)&capn_seg}}; uint32_t globalInt = 12345u; -capn_text globalText = {6,(char*)&capn_buf[2592],(struct capn_segment*)&capn_seg}; -TestAllTypes_ptr globalStruct = {{1,0,0,0,48,20,0,(char*)&capn_buf[2600],(struct capn_segment*)&capn_seg}}; -TestAllTypes_ptr derivedConstant = {{1,0,0,0,48,20,0,(char*)&capn_buf[2808],(struct capn_segment*)&capn_seg}}; +capn_text globalText = {6,(char*)&capn_buf[2616],(struct capn_segment*)&capn_seg}; +TestAllTypes_ptr globalStruct = {{1,1,0,0,48,20,0,(char*)&capn_buf[2632],(struct capn_segment*)&capn_seg}}; +TestPrintInlineStructs_ptr globalPrintableStruct = {{1,1,0,0,0,2,0,(char*)&capn_buf[2848],(struct capn_segment*)&capn_seg}}; +TestAllTypes_ptr derivedConstant = {{1,1,0,0,48,20,0,(char*)&capn_buf[2880],(struct capn_segment*)&capn_seg}}; TestAllTypes_ptr new_TestAllTypes(struct capn_segment *s) { TestAllTypes_ptr p; @@ -1088,7 +78,7 @@ void read_TestAllTypes(struct TestAllTypes *s, TestAllTypes_ptr p) { s->textField = capn_get_text(p.p, 0, capn_val0); s->dataField = capn_get_data(p.p, 1); s->structField.p = capn_getp(p.p, 2, 0); - s->enumField = (enum TestEnum) capn_read16(p.p, 36); + s->enumField = (enum TestEnum)(int) capn_read16(p.p, 36); s->voidList = capn_getp(p.p, 3, 0); s->boolList.p = capn_getp(p.p, 4, 0); s->int8List.p = capn_getp(p.p, 5, 0); @@ -1152,24 +142,25 @@ void set_TestAllTypes(const struct TestAllTypes *s, TestAllTypes_list l, int i) p.p = capn_getp(l.p, i, 0); write_TestAllTypes(s, p); } -capn_text capn_val1 = {3,(char*)&capn_buf[5368],(struct capn_segment*)&capn_seg}; -capn_data capn_val2 = {{2,0,0,0,1,0,3,(char*)&capn_buf[5376],(struct capn_segment*)&capn_seg}}; -TestAllTypes_ptr capn_val3 = {{1,0,0,0,48,20,0,(char*)&capn_buf[5384],(struct capn_segment*)&capn_seg}}; -capn_list1 capn_val4 = {{4,0,0,0,1,0,4,(char*)&capn_buf[7040],(struct capn_segment*)&capn_seg}}; -capn_list8 capn_val5 = {{2,0,0,0,1,0,2,(char*)&capn_buf[7048],(struct capn_segment*)&capn_seg}}; -capn_list16 capn_val6 = {{2,0,0,0,2,0,2,(char*)&capn_buf[7056],(struct capn_segment*)&capn_seg}}; -capn_list32 capn_val7 = {{2,0,0,0,4,0,2,(char*)&capn_buf[7064],(struct capn_segment*)&capn_seg}}; -capn_list64 capn_val8 = {{2,0,0,0,8,0,2,(char*)&capn_buf[7072],(struct capn_segment*)&capn_seg}}; -capn_list8 capn_val9 = {{2,0,0,0,1,0,2,(char*)&capn_buf[7088],(struct capn_segment*)&capn_seg}}; -capn_list16 capn_val10 = {{2,0,0,0,2,0,2,(char*)&capn_buf[7096],(struct capn_segment*)&capn_seg}}; -capn_list32 capn_val11 = {{2,0,0,0,4,0,1,(char*)&capn_buf[7104],(struct capn_segment*)&capn_seg}}; -capn_list64 capn_val12 = {{2,0,0,0,8,0,1,(char*)&capn_buf[7112],(struct capn_segment*)&capn_seg}}; -capn_list32 capn_val13 = {{2,0,0,0,4,0,4,(char*)&capn_buf[7120],(struct capn_segment*)&capn_seg}}; -capn_list64 capn_val14 = {{2,0,0,0,8,0,4,(char*)&capn_buf[7136],(struct capn_segment*)&capn_seg}}; -capn_ptr capn_val15 = {3,0,0,0,0,0,3,(char*)&capn_buf[7168],(struct capn_segment*)&capn_seg}; -capn_ptr capn_val16 = {3,0,0,0,0,0,3,(char*)&capn_buf[7216],(struct capn_segment*)&capn_seg}; -TestAllTypes_list capn_val17 = {{2,0,0,1,48,20,3,(char*)&capn_buf[7280],(struct capn_segment*)&capn_seg}}; -capn_list16 capn_val18 = {{2,0,0,0,2,0,2,(char*)&capn_buf[7952],(struct capn_segment*)&capn_seg}}; +capn_text capn_val1 = {3,(char*)&capn_buf[1496],(struct capn_segment*)&capn_seg}; +capn_data capn_val2 = {{2,1,0,0,1,0,3,(char*)&capn_buf[1512],(struct capn_segment*)&capn_seg}}; +TestAllTypes_ptr capn_val3 = {{1,1,0,0,48,20,0,(char*)&capn_buf[1528],(struct capn_segment*)&capn_seg}}; +capn_ptr capn_val4 = {2,0,0,0,0,0,6,(char*)&capn_buf[64],(struct capn_segment*)&capn_seg}; +capn_list1 capn_val5 = {{4,1,0,0,1,0,4,(char*)&capn_buf[3192],(struct capn_segment*)&capn_seg}}; +capn_list8 capn_val6 = {{2,1,0,0,1,0,2,(char*)&capn_buf[3208],(struct capn_segment*)&capn_seg}}; +capn_list16 capn_val7 = {{2,1,0,0,2,0,2,(char*)&capn_buf[3224],(struct capn_segment*)&capn_seg}}; +capn_list32 capn_val8 = {{2,1,0,0,4,0,2,(char*)&capn_buf[3240],(struct capn_segment*)&capn_seg}}; +capn_list64 capn_val9 = {{2,1,0,0,8,0,2,(char*)&capn_buf[3256],(struct capn_segment*)&capn_seg}}; +capn_list8 capn_val10 = {{2,1,0,0,1,0,2,(char*)&capn_buf[3280],(struct capn_segment*)&capn_seg}}; +capn_list16 capn_val11 = {{2,1,0,0,2,0,2,(char*)&capn_buf[3296],(struct capn_segment*)&capn_seg}}; +capn_list32 capn_val12 = {{2,1,0,0,4,0,1,(char*)&capn_buf[3312],(struct capn_segment*)&capn_seg}}; +capn_list64 capn_val13 = {{2,1,0,0,8,0,1,(char*)&capn_buf[3328],(struct capn_segment*)&capn_seg}}; +capn_list32 capn_val14 = {{2,1,0,0,4,0,4,(char*)&capn_buf[3344],(struct capn_segment*)&capn_seg}}; +capn_list64 capn_val15 = {{2,1,0,0,8,0,4,(char*)&capn_buf[3368],(struct capn_segment*)&capn_seg}}; +capn_ptr capn_val16 = {3,1,0,0,0,0,3,(char*)&capn_buf[3408],(struct capn_segment*)&capn_seg}; +capn_ptr capn_val17 = {3,1,0,0,0,0,3,(char*)&capn_buf[3464],(struct capn_segment*)&capn_seg}; +TestAllTypes_list capn_val18 = {{2,1,0,1,48,20,3,(char*)&capn_buf[8],(struct capn_segment*)&capn_seg}}; +capn_list16 capn_val19 = {{2,1,0,0,2,0,2,(char*)&capn_buf[3528],(struct capn_segment*)&capn_seg}}; TestDefaults_ptr new_TestDefaults(struct capn_segment *s) { TestDefaults_ptr p; @@ -1203,67 +194,70 @@ void read_TestDefaults(struct TestDefaults *s, TestDefaults_ptr p) { if (!s->structField.p.type) { s->structField = capn_val3; } - s->enumField = (enum TestEnum) capn_read16(p.p, 36) ^ 5u; + s->enumField = (enum TestEnum)(int) capn_read16(p.p, 36) ^ 5u; s->voidList = capn_getp(p.p, 3, 0); + if (!s->voidList.type) { + s->voidList = capn_val4; + } s->boolList.p = capn_getp(p.p, 4, 0); if (!s->boolList.p.type) { - s->boolList = capn_val4; + s->boolList = capn_val5; } s->int8List.p = capn_getp(p.p, 5, 0); if (!s->int8List.p.type) { - s->int8List = capn_val5; + s->int8List = capn_val6; } s->int16List.p = capn_getp(p.p, 6, 0); if (!s->int16List.p.type) { - s->int16List = capn_val6; + s->int16List = capn_val7; } s->int32List.p = capn_getp(p.p, 7, 0); if (!s->int32List.p.type) { - s->int32List = capn_val7; + s->int32List = capn_val8; } s->int64List.p = capn_getp(p.p, 8, 0); if (!s->int64List.p.type) { - s->int64List = capn_val8; + s->int64List = capn_val9; } s->uInt8List.p = capn_getp(p.p, 9, 0); if (!s->uInt8List.p.type) { - s->uInt8List = capn_val9; + s->uInt8List = capn_val10; } s->uInt16List.p = capn_getp(p.p, 10, 0); if (!s->uInt16List.p.type) { - s->uInt16List = capn_val10; + s->uInt16List = capn_val11; } s->uInt32List.p = capn_getp(p.p, 11, 0); if (!s->uInt32List.p.type) { - s->uInt32List = capn_val11; + s->uInt32List = capn_val12; } s->uInt64List.p = capn_getp(p.p, 12, 0); if (!s->uInt64List.p.type) { - s->uInt64List = capn_val12; + s->uInt64List = capn_val13; } s->float32List.p = capn_getp(p.p, 13, 0); if (!s->float32List.p.type) { - s->float32List = capn_val13; + s->float32List = capn_val14; } s->float64List.p = capn_getp(p.p, 14, 0); if (!s->float64List.p.type) { - s->float64List = capn_val14; + s->float64List = capn_val15; } s->textList = capn_getp(p.p, 15, 0); if (!s->textList.type) { - s->textList = capn_val15; + s->textList = capn_val16; } s->dataList = capn_getp(p.p, 16, 0); if (!s->dataList.type) { - s->dataList = capn_val16; + s->dataList = capn_val17; } s->structList.p = capn_getp(p.p, 17, 0); if (!s->structList.p.type) { - s->structList = capn_val17; + s->structList = capn_val18; } s->enumList.p = capn_getp(p.p, 18, 0); if (!s->enumList.p.type) { - s->enumList = capn_val18; + s->enumList = capn_val19; } s->interfaceList = capn_getp(p.p, 19, 0); } @@ -1284,22 +278,22 @@ void write_TestDefaults(const struct TestDefaults *s, TestDefaults_ptr p) { capn_setp(p.p, 1, (s->dataField.p.data != capn_val2.p.data) ? s->dataField.p : capn_null); capn_setp(p.p, 2, (s->structField.p.data != capn_val3.p.data) ? s->structField.p : capn_null); capn_write16(p.p, 36, (uint16_t) s->enumField ^ 5u); - capn_setp(p.p, 3, s->voidList); - capn_setp(p.p, 4, (s->boolList.p.data != capn_val4.p.data) ? s->boolList.p : capn_null); - capn_setp(p.p, 5, (s->int8List.p.data != capn_val5.p.data) ? s->int8List.p : capn_null); - capn_setp(p.p, 6, (s->int16List.p.data != capn_val6.p.data) ? s->int16List.p : capn_null); - capn_setp(p.p, 7, (s->int32List.p.data != capn_val7.p.data) ? s->int32List.p : capn_null); - capn_setp(p.p, 8, (s->int64List.p.data != capn_val8.p.data) ? s->int64List.p : capn_null); - capn_setp(p.p, 9, (s->uInt8List.p.data != capn_val9.p.data) ? s->uInt8List.p : capn_null); - capn_setp(p.p, 10, (s->uInt16List.p.data != capn_val10.p.data) ? s->uInt16List.p : capn_null); - capn_setp(p.p, 11, (s->uInt32List.p.data != capn_val11.p.data) ? s->uInt32List.p : capn_null); - capn_setp(p.p, 12, (s->uInt64List.p.data != capn_val12.p.data) ? s->uInt64List.p : capn_null); - capn_setp(p.p, 13, (s->float32List.p.data != capn_val13.p.data) ? s->float32List.p : capn_null); - capn_setp(p.p, 14, (s->float64List.p.data != capn_val14.p.data) ? s->float64List.p : capn_null); - capn_setp(p.p, 15, (s->textList.data != capn_val15.data) ? s->textList : capn_null); - capn_setp(p.p, 16, (s->dataList.data != capn_val16.data) ? s->dataList : capn_null); - capn_setp(p.p, 17, (s->structList.p.data != capn_val17.p.data) ? s->structList.p : capn_null); - capn_setp(p.p, 18, (s->enumList.p.data != capn_val18.p.data) ? s->enumList.p : capn_null); + capn_setp(p.p, 3, (s->voidList.data != capn_val4.data) ? s->voidList : capn_null); + capn_setp(p.p, 4, (s->boolList.p.data != capn_val5.p.data) ? s->boolList.p : capn_null); + capn_setp(p.p, 5, (s->int8List.p.data != capn_val6.p.data) ? s->int8List.p : capn_null); + capn_setp(p.p, 6, (s->int16List.p.data != capn_val7.p.data) ? s->int16List.p : capn_null); + capn_setp(p.p, 7, (s->int32List.p.data != capn_val8.p.data) ? s->int32List.p : capn_null); + capn_setp(p.p, 8, (s->int64List.p.data != capn_val9.p.data) ? s->int64List.p : capn_null); + capn_setp(p.p, 9, (s->uInt8List.p.data != capn_val10.p.data) ? s->uInt8List.p : capn_null); + capn_setp(p.p, 10, (s->uInt16List.p.data != capn_val11.p.data) ? s->uInt16List.p : capn_null); + capn_setp(p.p, 11, (s->uInt32List.p.data != capn_val12.p.data) ? s->uInt32List.p : capn_null); + capn_setp(p.p, 12, (s->uInt64List.p.data != capn_val13.p.data) ? s->uInt64List.p : capn_null); + capn_setp(p.p, 13, (s->float32List.p.data != capn_val14.p.data) ? s->float32List.p : capn_null); + capn_setp(p.p, 14, (s->float64List.p.data != capn_val15.p.data) ? s->float64List.p : capn_null); + capn_setp(p.p, 15, (s->textList.data != capn_val16.data) ? s->textList : capn_null); + capn_setp(p.p, 16, (s->dataList.data != capn_val17.data) ? s->dataList : capn_null); + capn_setp(p.p, 17, (s->structList.p.data != capn_val18.p.data) ? s->structList.p : capn_null); + capn_setp(p.p, 18, (s->enumList.p.data != capn_val19.p.data) ? s->enumList.p : capn_null); capn_setp(p.p, 19, s->interfaceList); } void get_TestDefaults(struct TestDefaults *s, TestDefaults_list l, int i) { @@ -1313,33 +307,33 @@ void set_TestDefaults(const struct TestDefaults *s, TestDefaults_list l, int i) write_TestDefaults(s, p); } -TestObject_ptr new_TestObject(struct capn_segment *s) { - TestObject_ptr p; +TestAnyPointer_ptr new_TestAnyPointer(struct capn_segment *s) { + TestAnyPointer_ptr p; p.p = capn_new_struct(s, 0, 1); return p; } -TestObject_list new_TestObject_list(struct capn_segment *s, int len) { - TestObject_list p; +TestAnyPointer_list new_TestAnyPointer_list(struct capn_segment *s, int len) { + TestAnyPointer_list p; p.p = capn_new_list(s, len, 0, 1); return p; } -void read_TestObject(struct TestObject *s, TestObject_ptr p) { +void read_TestAnyPointer(struct TestAnyPointer *s, TestAnyPointer_ptr p) { capn_resolve(&p.p); - s->objectField = capn_getp(p.p, 0, 0); + s->anyPointerField = capn_getp(p.p, 0, 0); } -void write_TestObject(const struct TestObject *s, TestObject_ptr p) { +void write_TestAnyPointer(const struct TestAnyPointer *s, TestAnyPointer_ptr p) { capn_resolve(&p.p); - capn_setp(p.p, 0, s->objectField); + capn_setp(p.p, 0, s->anyPointerField); } -void get_TestObject(struct TestObject *s, TestObject_list l, int i) { - TestObject_ptr p; +void get_TestAnyPointer(struct TestAnyPointer *s, TestAnyPointer_list l, int i) { + TestAnyPointer_ptr p; p.p = capn_getp(l.p, i, 0); - read_TestObject(s, p); + read_TestAnyPointer(s, p); } -void set_TestObject(const struct TestObject *s, TestObject_list l, int i) { - TestObject_ptr p; +void set_TestAnyPointer(const struct TestAnyPointer *s, TestAnyPointer_list l, int i) { + TestAnyPointer_ptr p; p.p = capn_getp(l.p, i, 0); - write_TestObject(s, p); + write_TestAnyPointer(s, p); } TestOutOfOrder_ptr new_TestOutOfOrder(struct capn_segment *s) { @@ -1399,7 +393,7 @@ TestUnion_list new_TestUnion_list(struct capn_segment *s, int len) { } void read_TestUnion(struct TestUnion *s, TestUnion_ptr p) { capn_resolve(&p.p); - s->union0_which = (enum TestUnion_union0_which) capn_read16(p.p, 0); + s->union0_which = (enum TestUnion_union0_which)(int) capn_read16(p.p, 0); switch (s->union0_which) { case TestUnion_union0_u0f0s1: case TestUnion_union0_u0f1s1: @@ -1429,7 +423,7 @@ void read_TestUnion(struct TestUnion *s, TestUnion_ptr p) { break; } s->bit0 = (capn_read8(p.p, 16) & 1) != 0; - s->union1_which = (enum TestUnion_union1_which) capn_read16(p.p, 2); + s->union1_which = (enum TestUnion_union1_which)(int) capn_read16(p.p, 2); switch (s->union1_which) { case TestUnion_union1_u1f0s1: case TestUnion_union1_u1f1s1: @@ -1470,7 +464,7 @@ void read_TestUnion(struct TestUnion *s, TestUnion_ptr p) { s->bit5 = (capn_read8(p.p, 16) & 32) != 0; s->bit6 = (capn_read8(p.p, 16) & 64) != 0; s->bit7 = (capn_read8(p.p, 16) & 128) != 0; - s->union2_which = (enum TestUnion_union2_which) capn_read16(p.p, 4); + s->union2_which = (enum TestUnion_union2_which)(int) capn_read16(p.p, 4); switch (s->union2_which) { case TestUnion_union2_u2f0s1: s->union2.u2f0s1 = (capn_read8(p.p, 32) & 1) != 0; @@ -1490,7 +484,7 @@ void read_TestUnion(struct TestUnion *s, TestUnion_ptr p) { default: break; } - s->union3_which = (enum TestUnion_union3_which) capn_read16(p.p, 6); + s->union3_which = (enum TestUnion_union3_which)(int) capn_read16(p.p, 6); switch (s->union3_which) { case TestUnion_union3_u3f0s1: s->union3.u3f0s1 = (capn_read8(p.p, 32) & 2) != 0; @@ -1651,7 +645,7 @@ TestUnnamedUnion_list new_TestUnnamedUnion_list(struct capn_segment *s, int len) void read_TestUnnamedUnion(struct TestUnnamedUnion *s, TestUnnamedUnion_ptr p) { capn_resolve(&p.p); s->before = capn_get_text(p.p, 0, capn_val0); - s->which = (enum TestUnnamedUnion_which) capn_read16(p.p, 4); + s->which = (enum TestUnnamedUnion_which)(int) capn_read16(p.p, 4); switch (s->which) { case TestUnnamedUnion_foo: s->foo = capn_read16(p.p, 0); @@ -1705,13 +699,13 @@ TestUnionInUnion_list new_TestUnionInUnion_list(struct capn_segment *s, int len) } void read_TestUnionInUnion(struct TestUnionInUnion *s, TestUnionInUnion_ptr p) { capn_resolve(&p.p); - s->outer_which = (enum TestUnionInUnion_outer_which) capn_read16(p.p, 8); + s->outer_which = (enum TestUnionInUnion_outer_which)(int) capn_read16(p.p, 8); switch (s->outer_which) { case TestUnionInUnion_outer_baz: s->outer.baz = (int32_t) capn_read32(p.p, 0); break; case TestUnionInUnion_outer_inner: - s->outer.inner_which = (enum TestUnionInUnion_outer_inner_which) capn_read16(p.p, 4); + s->outer.inner_which = (enum TestUnionInUnion_outer_inner_which)(int) capn_read16(p.p, 4); switch (s->outer.inner_which) { case TestUnionInUnion_outer_inner_foo: case TestUnionInUnion_outer_inner_bar: @@ -1770,7 +764,7 @@ TestGroups_list new_TestGroups_list(struct capn_segment *s, int len) { } void read_TestGroups(struct TestGroups *s, TestGroups_ptr p) { capn_resolve(&p.p); - s->groups_which = (enum TestGroups_groups_which) capn_read16(p.p, 4); + s->groups_which = (enum TestGroups_groups_which)(int) capn_read16(p.p, 4); switch (s->groups_which) { case TestGroups_groups_foo: s->groups.foo.corge = (int32_t) capn_read32(p.p, 0); @@ -1839,7 +833,7 @@ void read_TestInterleavedGroups(struct TestInterleavedGroups *s, TestInterleaved capn_resolve(&p.p); s->group1.foo = capn_read32(p.p, 0); s->group1.bar = capn_read64(p.p, 8); - s->group1.which = (enum TestInterleavedGroups_group1_which) capn_read16(p.p, 28); + s->group1.which = (enum TestInterleavedGroups_group1_which)(int) capn_read16(p.p, 28); switch (s->group1.which) { case TestInterleavedGroups_group1_qux: s->group1.qux = capn_read16(p.p, 24); @@ -1859,7 +853,7 @@ void read_TestInterleavedGroups(struct TestInterleavedGroups *s, TestInterleaved s->group1.waldo = capn_get_text(p.p, 0, capn_val0); s->group2.foo = capn_read32(p.p, 4); s->group2.bar = capn_read64(p.p, 16); - s->group2.which = (enum TestInterleavedGroups_group2_which) capn_read16(p.p, 30); + s->group2.which = (enum TestInterleavedGroups_group2_which)(int) capn_read16(p.p, 30); switch (s->group2.which) { case TestInterleavedGroups_group2_qux: s->group2.qux = capn_read16(p.p, 26); @@ -1931,10 +925,10 @@ void set_TestInterleavedGroups(const struct TestInterleavedGroups *s, TestInterl p.p = capn_getp(l.p, i, 0); write_TestInterleavedGroups(s, p); } -TestUnion_ptr capn_val19 = {{1,0,0,0,64,2,0,(char*)&capn_buf[7960],(struct capn_segment*)&capn_seg}}; -TestUnion_ptr capn_val20 = {{1,0,0,0,64,2,0,(char*)&capn_buf[8040],(struct capn_segment*)&capn_seg}}; -TestUnnamedUnion_ptr capn_val21 = {{1,0,0,0,16,2,0,(char*)&capn_buf[8128],(struct capn_segment*)&capn_seg}}; -TestUnnamedUnion_ptr capn_val22 = {{1,1,0,0,16,2,0,(char*)&capn_buf[0],(struct capn_segment*)&capn_seg}}; +TestUnion_ptr capn_val20 = {{1,1,0,0,64,2,0,(char*)&capn_buf[3544],(struct capn_segment*)&capn_seg}}; +TestUnion_ptr capn_val21 = {{1,1,0,0,64,2,0,(char*)&capn_buf[3632],(struct capn_segment*)&capn_seg}}; +TestUnnamedUnion_ptr capn_val22 = {{1,1,0,0,16,2,0,(char*)&capn_buf[3728],(struct capn_segment*)&capn_seg}}; +TestUnnamedUnion_ptr capn_val23 = {{1,1,0,0,16,2,0,(char*)&capn_buf[3768],(struct capn_segment*)&capn_seg}}; TestUnionDefaults_ptr new_TestUnionDefaults(struct capn_segment *s) { TestUnionDefaults_ptr p; @@ -1950,27 +944,27 @@ void read_TestUnionDefaults(struct TestUnionDefaults *s, TestUnionDefaults_ptr p capn_resolve(&p.p); s->s16s8s64s8Set.p = capn_getp(p.p, 0, 0); if (!s->s16s8s64s8Set.p.type) { - s->s16s8s64s8Set = capn_val19; + s->s16s8s64s8Set = capn_val20; } s->s0sps1s32Set.p = capn_getp(p.p, 1, 0); if (!s->s0sps1s32Set.p.type) { - s->s0sps1s32Set = capn_val20; + s->s0sps1s32Set = capn_val21; } s->unnamed1.p = capn_getp(p.p, 2, 0); if (!s->unnamed1.p.type) { - s->unnamed1 = capn_val21; + s->unnamed1 = capn_val22; } s->unnamed2.p = capn_getp(p.p, 3, 0); if (!s->unnamed2.p.type) { - s->unnamed2 = capn_val22; + s->unnamed2 = capn_val23; } } void write_TestUnionDefaults(const struct TestUnionDefaults *s, TestUnionDefaults_ptr p) { capn_resolve(&p.p); - capn_setp(p.p, 0, (s->s16s8s64s8Set.p.data != capn_val19.p.data) ? s->s16s8s64s8Set.p : capn_null); - capn_setp(p.p, 1, (s->s0sps1s32Set.p.data != capn_val20.p.data) ? s->s0sps1s32Set.p : capn_null); - capn_setp(p.p, 2, (s->unnamed1.p.data != capn_val21.p.data) ? s->unnamed1.p : capn_null); - capn_setp(p.p, 3, (s->unnamed2.p.data != capn_val22.p.data) ? s->unnamed2.p : capn_null); + capn_setp(p.p, 0, (s->s16s8s64s8Set.p.data != capn_val20.p.data) ? s->s16s8s64s8Set.p : capn_null); + capn_setp(p.p, 1, (s->s0sps1s32Set.p.data != capn_val21.p.data) ? s->s0sps1s32Set.p : capn_null); + capn_setp(p.p, 2, (s->unnamed1.p.data != capn_val22.p.data) ? s->unnamed1.p : capn_null); + capn_setp(p.p, 3, (s->unnamed2.p.data != capn_val23.p.data) ? s->unnamed2.p : capn_null); } void get_TestUnionDefaults(struct TestUnionDefaults *s, TestUnionDefaults_list l, int i) { TestUnionDefaults_ptr p; @@ -1996,8 +990,8 @@ TestNestedTypes_list new_TestNestedTypes_list(struct capn_segment *s, int len) { void read_TestNestedTypes(struct TestNestedTypes *s, TestNestedTypes_ptr p) { capn_resolve(&p.p); s->nestedStruct.p = capn_getp(p.p, 0, 0); - s->outerNestedEnum = (enum TestNestedTypes_NestedEnum) capn_read16(p.p, 0) ^ 1u; - s->innerNestedEnum = (enum TestNestedTypes_NestedStruct_NestedEnum) capn_read16(p.p, 2) ^ 2u; + s->outerNestedEnum = (enum TestNestedTypes_NestedEnum)(int) capn_read16(p.p, 0) ^ 1u; + s->innerNestedEnum = (enum TestNestedTypes_NestedStruct_NestedEnum)(int) capn_read16(p.p, 2) ^ 2u; } void write_TestNestedTypes(const struct TestNestedTypes *s, TestNestedTypes_ptr p) { capn_resolve(&p.p); @@ -2028,8 +1022,8 @@ TestNestedTypes_NestedStruct_list new_TestNestedTypes_NestedStruct_list(struct c } void read_TestNestedTypes_NestedStruct(struct TestNestedTypes_NestedStruct *s, TestNestedTypes_NestedStruct_ptr p) { capn_resolve(&p.p); - s->outerNestedEnum = (enum TestNestedTypes_NestedEnum) capn_read16(p.p, 0) ^ 1u; - s->innerNestedEnum = (enum TestNestedTypes_NestedStruct_NestedEnum) capn_read16(p.p, 2) ^ 2u; + s->outerNestedEnum = (enum TestNestedTypes_NestedEnum)(int) capn_read16(p.p, 0) ^ 1u; + s->innerNestedEnum = (enum TestNestedTypes_NestedStruct_NestedEnum)(int) capn_read16(p.p, 2) ^ 2u; } void write_TestNestedTypes_NestedStruct(const struct TestNestedTypes_NestedStruct *s, TestNestedTypes_NestedStruct_ptr p) { capn_resolve(&p.p); @@ -2059,8 +1053,8 @@ TestUsing_list new_TestUsing_list(struct capn_segment *s, int len) { } void read_TestUsing(struct TestUsing *s, TestUsing_ptr p) { capn_resolve(&p.p); - s->outerNestedEnum = (enum TestNestedTypes_NestedEnum) capn_read16(p.p, 2) ^ 1u; - s->innerNestedEnum = (enum TestNestedTypes_NestedStruct_NestedEnum) capn_read16(p.p, 0) ^ 2u; + s->outerNestedEnum = (enum TestNestedTypes_NestedEnum)(int) capn_read16(p.p, 2) ^ 1u; + s->innerNestedEnum = (enum TestNestedTypes_NestedStruct_NestedEnum)(int) capn_read16(p.p, 0) ^ 2u; } void write_TestUsing(const struct TestUsing *s, TestUsing_ptr p) { capn_resolve(&p.p); @@ -2573,7 +1567,7 @@ void set_TestFieldZeroIsBit(const struct TestFieldZeroIsBit *s, TestFieldZeroIsB p.p = capn_getp(l.p, i, 0); write_TestFieldZeroIsBit(s, p); } -TestLists_ptr capn_val23 = {{1,1,0,0,0,10,0,(char*)&capn_buf[56],(struct capn_segment*)&capn_seg}}; +TestLists_ptr capn_val24 = {{1,1,0,0,0,10,0,(char*)&capn_buf[3824],(struct capn_segment*)&capn_seg}}; TestListDefaults_ptr new_TestListDefaults(struct capn_segment *s) { TestListDefaults_ptr p; @@ -2589,12 +1583,12 @@ void read_TestListDefaults(struct TestListDefaults *s, TestListDefaults_ptr p) { capn_resolve(&p.p); s->lists.p = capn_getp(p.p, 0, 0); if (!s->lists.p.type) { - s->lists = capn_val23; + s->lists = capn_val24; } } void write_TestListDefaults(const struct TestListDefaults *s, TestListDefaults_ptr p) { capn_resolve(&p.p); - capn_setp(p.p, 0, (s->lists.p.data != capn_val23.p.data) ? s->lists.p : capn_null); + capn_setp(p.p, 0, (s->lists.p.data != capn_val24.p.data) ? s->lists.p : capn_null); } void get_TestListDefaults(struct TestListDefaults *s, TestListDefaults_list l, int i) { TestListDefaults_ptr p; @@ -2622,7 +1616,7 @@ void read_TestLateUnion(struct TestLateUnion *s, TestLateUnion_ptr p) { s->foo = (int32_t) capn_read32(p.p, 0); s->bar = capn_get_text(p.p, 0, capn_val0); s->baz = (int16_t) capn_read16(p.p, 4); - s->theUnion_which = (enum TestLateUnion_theUnion_which) capn_read16(p.p, 6); + s->theUnion_which = (enum TestLateUnion_theUnion_which)(int) capn_read16(p.p, 6); switch (s->theUnion_which) { case TestLateUnion_theUnion_grault: s->theUnion.grault = capn_to_f32(capn_read32(p.p, 8)); @@ -2636,7 +1630,7 @@ void read_TestLateUnion(struct TestLateUnion *s, TestLateUnion_ptr p) { default: break; } - s->anotherUnion_which = (enum TestLateUnion_anotherUnion_which) capn_read16(p.p, 12); + s->anotherUnion_which = (enum TestLateUnion_anotherUnion_which)(int) capn_read16(p.p, 12); switch (s->anotherUnion_which) { case TestLateUnion_anotherUnion_grault: s->anotherUnion.grault = capn_to_f32(capn_read32(p.p, 16)); @@ -2728,7 +1722,7 @@ void set_TestOldVersion(const struct TestOldVersion *s, TestOldVersion_list l, i p.p = capn_getp(l.p, i, 0); write_TestOldVersion(s, p); } -capn_text capn_val24 = {3,(char*)&capn_buf[8160],(struct capn_segment*)&capn_seg}; +capn_text capn_val25 = {3,(char*)&capn_buf[1576],(struct capn_segment*)&capn_seg}; TestNewVersion_ptr new_TestNewVersion(struct capn_segment *s) { TestNewVersion_ptr p; @@ -2746,7 +1740,7 @@ void read_TestNewVersion(struct TestNewVersion *s, TestNewVersion_ptr p) { s->old2 = capn_get_text(p.p, 0, capn_val0); s->old3.p = capn_getp(p.p, 1, 0); s->new1 = (int64_t) capn_read64(p.p, 8) ^ ((uint64_t) 0u << 32) ^ 0x3dbu; - s->new2 = capn_get_text(p.p, 2, capn_val24); + s->new2 = capn_get_text(p.p, 2, capn_val25); } void write_TestNewVersion(const struct TestNewVersion *s, TestNewVersion_ptr p) { capn_resolve(&p.p); @@ -2754,7 +1748,7 @@ void write_TestNewVersion(const struct TestNewVersion *s, TestNewVersion_ptr p) capn_set_text(p.p, 0, s->old2); capn_setp(p.p, 1, s->old3.p); capn_write64(p.p, 8, (uint64_t) s->new1 ^ ((uint64_t) 0u << 32) ^ 0x3dbu); - capn_set_text(p.p, 2, (s->new2.str != capn_val24.str) ? s->new2 : capn_val0); + capn_set_text(p.p, 2, (s->new2.str != capn_val25.str) ? s->new2 : capn_val0); } void get_TestNewVersion(struct TestNewVersion *s, TestNewVersion_list l, int i) { TestNewVersion_ptr p; @@ -2779,9 +1773,9 @@ TestStructUnion_list new_TestStructUnion_list(struct capn_segment *s, int len) { } void read_TestStructUnion(struct TestStructUnion *s, TestStructUnion_ptr p) { capn_resolve(&p.p); - s->un_which = (enum TestStructUnion_un_which) capn_read16(p.p, 0); + s->un_which = (enum TestStructUnion_un_which)(int) capn_read16(p.p, 0); switch (s->un_which) { - case TestStructUnion_un_allTypes: + case TestStructUnion_un__struct: case TestStructUnion_un_object: s->un.object.p = capn_getp(p.p, 0, 0); break; @@ -2793,7 +1787,7 @@ void write_TestStructUnion(const struct TestStructUnion *s, TestStructUnion_ptr capn_resolve(&p.p); capn_write16(p.p, 0, s->un_which); switch (s->un_which) { - case TestStructUnion_un_allTypes: + case TestStructUnion_un__struct: case TestStructUnion_un_object: capn_setp(p.p, 0, s->un.object.p); break; @@ -2812,6 +1806,130 @@ void set_TestStructUnion(const struct TestStructUnion *s, TestStructUnion_list l write_TestStructUnion(s, p); } +TestStructUnion_SomeStruct_ptr new_TestStructUnion_SomeStruct(struct capn_segment *s) { + TestStructUnion_SomeStruct_ptr p; + p.p = capn_new_struct(s, 0, 2); + return p; +} +TestStructUnion_SomeStruct_list new_TestStructUnion_SomeStruct_list(struct capn_segment *s, int len) { + TestStructUnion_SomeStruct_list p; + p.p = capn_new_list(s, len, 0, 2); + return p; +} +void read_TestStructUnion_SomeStruct(struct TestStructUnion_SomeStruct *s, TestStructUnion_SomeStruct_ptr p) { + capn_resolve(&p.p); + s->someText = capn_get_text(p.p, 0, capn_val0); + s->moreText = capn_get_text(p.p, 1, capn_val0); +} +void write_TestStructUnion_SomeStruct(const struct TestStructUnion_SomeStruct *s, TestStructUnion_SomeStruct_ptr p) { + capn_resolve(&p.p); + capn_set_text(p.p, 0, s->someText); + capn_set_text(p.p, 1, s->moreText); +} +void get_TestStructUnion_SomeStruct(struct TestStructUnion_SomeStruct *s, TestStructUnion_SomeStruct_list l, int i) { + TestStructUnion_SomeStruct_ptr p; + p.p = capn_getp(l.p, i, 0); + read_TestStructUnion_SomeStruct(s, p); +} +void set_TestStructUnion_SomeStruct(const struct TestStructUnion_SomeStruct *s, TestStructUnion_SomeStruct_list l, int i) { + TestStructUnion_SomeStruct_ptr p; + p.p = capn_getp(l.p, i, 0); + write_TestStructUnion_SomeStruct(s, p); +} + +TestPrintInlineStructs_ptr new_TestPrintInlineStructs(struct capn_segment *s) { + TestPrintInlineStructs_ptr p; + p.p = capn_new_struct(s, 0, 2); + return p; +} +TestPrintInlineStructs_list new_TestPrintInlineStructs_list(struct capn_segment *s, int len) { + TestPrintInlineStructs_list p; + p.p = capn_new_list(s, len, 0, 2); + return p; +} +void read_TestPrintInlineStructs(struct TestPrintInlineStructs *s, TestPrintInlineStructs_ptr p) { + capn_resolve(&p.p); + s->someText = capn_get_text(p.p, 0, capn_val0); + s->structList.p = capn_getp(p.p, 1, 0); +} +void write_TestPrintInlineStructs(const struct TestPrintInlineStructs *s, TestPrintInlineStructs_ptr p) { + capn_resolve(&p.p); + capn_set_text(p.p, 0, s->someText); + capn_setp(p.p, 1, s->structList.p); +} +void get_TestPrintInlineStructs(struct TestPrintInlineStructs *s, TestPrintInlineStructs_list l, int i) { + TestPrintInlineStructs_ptr p; + p.p = capn_getp(l.p, i, 0); + read_TestPrintInlineStructs(s, p); +} +void set_TestPrintInlineStructs(const struct TestPrintInlineStructs *s, TestPrintInlineStructs_list l, int i) { + TestPrintInlineStructs_ptr p; + p.p = capn_getp(l.p, i, 0); + write_TestPrintInlineStructs(s, p); +} + +TestPrintInlineStructs_InlineStruct_ptr new_TestPrintInlineStructs_InlineStruct(struct capn_segment *s) { + TestPrintInlineStructs_InlineStruct_ptr p; + p.p = capn_new_struct(s, 8, 1); + return p; +} +TestPrintInlineStructs_InlineStruct_list new_TestPrintInlineStructs_InlineStruct_list(struct capn_segment *s, int len) { + TestPrintInlineStructs_InlineStruct_list p; + p.p = capn_new_list(s, len, 8, 1); + return p; +} +void read_TestPrintInlineStructs_InlineStruct(struct TestPrintInlineStructs_InlineStruct *s, TestPrintInlineStructs_InlineStruct_ptr p) { + capn_resolve(&p.p); + s->int32Field = (int32_t) capn_read32(p.p, 0); + s->textField = capn_get_text(p.p, 0, capn_val0); +} +void write_TestPrintInlineStructs_InlineStruct(const struct TestPrintInlineStructs_InlineStruct *s, TestPrintInlineStructs_InlineStruct_ptr p) { + capn_resolve(&p.p); + capn_write32(p.p, 0, (uint32_t) s->int32Field); + capn_set_text(p.p, 0, s->textField); +} +void get_TestPrintInlineStructs_InlineStruct(struct TestPrintInlineStructs_InlineStruct *s, TestPrintInlineStructs_InlineStruct_list l, int i) { + TestPrintInlineStructs_InlineStruct_ptr p; + p.p = capn_getp(l.p, i, 0); + read_TestPrintInlineStructs_InlineStruct(s, p); +} +void set_TestPrintInlineStructs_InlineStruct(const struct TestPrintInlineStructs_InlineStruct *s, TestPrintInlineStructs_InlineStruct_list l, int i) { + TestPrintInlineStructs_InlineStruct_ptr p; + p.p = capn_getp(l.p, i, 0); + write_TestPrintInlineStructs_InlineStruct(s, p); +} + +TestWholeFloatDefault_ptr new_TestWholeFloatDefault(struct capn_segment *s) { + TestWholeFloatDefault_ptr p; + p.p = capn_new_struct(s, 8, 0); + return p; +} +TestWholeFloatDefault_list new_TestWholeFloatDefault_list(struct capn_segment *s, int len) { + TestWholeFloatDefault_list p; + p.p = capn_new_list(s, len, 8, 0); + return p; +} +void read_TestWholeFloatDefault(struct TestWholeFloatDefault *s, TestWholeFloatDefault_ptr p) { + capn_resolve(&p.p); + s->field = capn_to_f32(capn_read32(p.p, 0) ^ 0x42f60000u); + s->bigField = capn_to_f32(capn_read32(p.p, 4) ^ 0x71c9f2cau); +} +void write_TestWholeFloatDefault(const struct TestWholeFloatDefault *s, TestWholeFloatDefault_ptr p) { + capn_resolve(&p.p); + capn_write32(p.p, 0, capn_from_f32(s->field) ^ 0x42f60000u); + capn_write32(p.p, 4, capn_from_f32(s->bigField) ^ 0x71c9f2cau); +} +void get_TestWholeFloatDefault(struct TestWholeFloatDefault *s, TestWholeFloatDefault_list l, int i) { + TestWholeFloatDefault_ptr p; + p.p = capn_getp(l.p, i, 0); + read_TestWholeFloatDefault(s, p); +} +void set_TestWholeFloatDefault(const struct TestWholeFloatDefault *s, TestWholeFloatDefault_list l, int i) { + TestWholeFloatDefault_ptr p; + p.p = capn_getp(l.p, i, 0); + write_TestWholeFloatDefault(s, p); +} + TestEmptyStruct_ptr new_TestEmptyStruct(struct capn_segment *s) { TestEmptyStruct_ptr p; p.p = capn_new_struct(s, 0, 0); @@ -2865,3 +1983,302 @@ void set_TestConstants(const struct TestConstants *s, TestConstants_list l, int p.p = capn_getp(l.p, i, 0); write_TestConstants(s, p); } + +TestSturdyRef_ptr new_TestSturdyRef(struct capn_segment *s) { + TestSturdyRef_ptr p; + p.p = capn_new_struct(s, 0, 2); + return p; +} +TestSturdyRef_list new_TestSturdyRef_list(struct capn_segment *s, int len) { + TestSturdyRef_list p; + p.p = capn_new_list(s, len, 0, 2); + return p; +} +void read_TestSturdyRef(struct TestSturdyRef *s, TestSturdyRef_ptr p) { + capn_resolve(&p.p); + s->hostId.p = capn_getp(p.p, 0, 0); + s->objectId = capn_getp(p.p, 1, 0); +} +void write_TestSturdyRef(const struct TestSturdyRef *s, TestSturdyRef_ptr p) { + capn_resolve(&p.p); + capn_setp(p.p, 0, s->hostId.p); + capn_setp(p.p, 1, s->objectId); +} +void get_TestSturdyRef(struct TestSturdyRef *s, TestSturdyRef_list l, int i) { + TestSturdyRef_ptr p; + p.p = capn_getp(l.p, i, 0); + read_TestSturdyRef(s, p); +} +void set_TestSturdyRef(const struct TestSturdyRef *s, TestSturdyRef_list l, int i) { + TestSturdyRef_ptr p; + p.p = capn_getp(l.p, i, 0); + write_TestSturdyRef(s, p); +} + +TestSturdyRefHostId_ptr new_TestSturdyRefHostId(struct capn_segment *s) { + TestSturdyRefHostId_ptr p; + p.p = capn_new_struct(s, 0, 1); + return p; +} +TestSturdyRefHostId_list new_TestSturdyRefHostId_list(struct capn_segment *s, int len) { + TestSturdyRefHostId_list p; + p.p = capn_new_list(s, len, 0, 1); + return p; +} +void read_TestSturdyRefHostId(struct TestSturdyRefHostId *s, TestSturdyRefHostId_ptr p) { + capn_resolve(&p.p); + s->host = capn_get_text(p.p, 0, capn_val0); +} +void write_TestSturdyRefHostId(const struct TestSturdyRefHostId *s, TestSturdyRefHostId_ptr p) { + capn_resolve(&p.p); + capn_set_text(p.p, 0, s->host); +} +void get_TestSturdyRefHostId(struct TestSturdyRefHostId *s, TestSturdyRefHostId_list l, int i) { + TestSturdyRefHostId_ptr p; + p.p = capn_getp(l.p, i, 0); + read_TestSturdyRefHostId(s, p); +} +void set_TestSturdyRefHostId(const struct TestSturdyRefHostId *s, TestSturdyRefHostId_list l, int i) { + TestSturdyRefHostId_ptr p; + p.p = capn_getp(l.p, i, 0); + write_TestSturdyRefHostId(s, p); +} + +TestSturdyRefObjectId_ptr new_TestSturdyRefObjectId(struct capn_segment *s) { + TestSturdyRefObjectId_ptr p; + p.p = capn_new_struct(s, 8, 0); + return p; +} +TestSturdyRefObjectId_list new_TestSturdyRefObjectId_list(struct capn_segment *s, int len) { + TestSturdyRefObjectId_list p; + p.p = capn_new_list(s, len, 8, 0); + return p; +} +void read_TestSturdyRefObjectId(struct TestSturdyRefObjectId *s, TestSturdyRefObjectId_ptr p) { + capn_resolve(&p.p); + s->tag = (enum TestSturdyRefObjectId_Tag)(int) capn_read16(p.p, 0); +} +void write_TestSturdyRefObjectId(const struct TestSturdyRefObjectId *s, TestSturdyRefObjectId_ptr p) { + capn_resolve(&p.p); + capn_write16(p.p, 0, (uint16_t) s->tag); +} +void get_TestSturdyRefObjectId(struct TestSturdyRefObjectId *s, TestSturdyRefObjectId_list l, int i) { + TestSturdyRefObjectId_ptr p; + p.p = capn_getp(l.p, i, 0); + read_TestSturdyRefObjectId(s, p); +} +void set_TestSturdyRefObjectId(const struct TestSturdyRefObjectId *s, TestSturdyRefObjectId_list l, int i) { + TestSturdyRefObjectId_ptr p; + p.p = capn_getp(l.p, i, 0); + write_TestSturdyRefObjectId(s, p); +} + +TestProvisionId_ptr new_TestProvisionId(struct capn_segment *s) { + TestProvisionId_ptr p; + p.p = capn_new_struct(s, 0, 0); + return p; +} +TestProvisionId_list new_TestProvisionId_list(struct capn_segment *s, int len) { + TestProvisionId_list p; + p.p = capn_new_list(s, len, 0, 0); + return p; +} +void read_TestProvisionId(struct TestProvisionId *s, TestProvisionId_ptr p) { + capn_resolve(&p.p); +} +void write_TestProvisionId(const struct TestProvisionId *s, TestProvisionId_ptr p) { + capn_resolve(&p.p); +} +void get_TestProvisionId(struct TestProvisionId *s, TestProvisionId_list l, int i) { + TestProvisionId_ptr p; + p.p = capn_getp(l.p, i, 0); + read_TestProvisionId(s, p); +} +void set_TestProvisionId(const struct TestProvisionId *s, TestProvisionId_list l, int i) { + TestProvisionId_ptr p; + p.p = capn_getp(l.p, i, 0); + write_TestProvisionId(s, p); +} + +TestRecipientId_ptr new_TestRecipientId(struct capn_segment *s) { + TestRecipientId_ptr p; + p.p = capn_new_struct(s, 0, 0); + return p; +} +TestRecipientId_list new_TestRecipientId_list(struct capn_segment *s, int len) { + TestRecipientId_list p; + p.p = capn_new_list(s, len, 0, 0); + return p; +} +void read_TestRecipientId(struct TestRecipientId *s, TestRecipientId_ptr p) { + capn_resolve(&p.p); +} +void write_TestRecipientId(const struct TestRecipientId *s, TestRecipientId_ptr p) { + capn_resolve(&p.p); +} +void get_TestRecipientId(struct TestRecipientId *s, TestRecipientId_list l, int i) { + TestRecipientId_ptr p; + p.p = capn_getp(l.p, i, 0); + read_TestRecipientId(s, p); +} +void set_TestRecipientId(const struct TestRecipientId *s, TestRecipientId_list l, int i) { + TestRecipientId_ptr p; + p.p = capn_getp(l.p, i, 0); + write_TestRecipientId(s, p); +} + +TestThirdPartyCapId_ptr new_TestThirdPartyCapId(struct capn_segment *s) { + TestThirdPartyCapId_ptr p; + p.p = capn_new_struct(s, 0, 0); + return p; +} +TestThirdPartyCapId_list new_TestThirdPartyCapId_list(struct capn_segment *s, int len) { + TestThirdPartyCapId_list p; + p.p = capn_new_list(s, len, 0, 0); + return p; +} +void read_TestThirdPartyCapId(struct TestThirdPartyCapId *s, TestThirdPartyCapId_ptr p) { + capn_resolve(&p.p); +} +void write_TestThirdPartyCapId(const struct TestThirdPartyCapId *s, TestThirdPartyCapId_ptr p) { + capn_resolve(&p.p); +} +void get_TestThirdPartyCapId(struct TestThirdPartyCapId *s, TestThirdPartyCapId_list l, int i) { + TestThirdPartyCapId_ptr p; + p.p = capn_getp(l.p, i, 0); + read_TestThirdPartyCapId(s, p); +} +void set_TestThirdPartyCapId(const struct TestThirdPartyCapId *s, TestThirdPartyCapId_list l, int i) { + TestThirdPartyCapId_ptr p; + p.p = capn_getp(l.p, i, 0); + write_TestThirdPartyCapId(s, p); +} + +TestJoinResult_ptr new_TestJoinResult(struct capn_segment *s) { + TestJoinResult_ptr p; + p.p = capn_new_struct(s, 0, 0); + return p; +} +TestJoinResult_list new_TestJoinResult_list(struct capn_segment *s, int len) { + TestJoinResult_list p; + p.p = capn_new_list(s, len, 0, 0); + return p; +} +void read_TestJoinResult(struct TestJoinResult *s, TestJoinResult_ptr p) { + capn_resolve(&p.p); +} +void write_TestJoinResult(const struct TestJoinResult *s, TestJoinResult_ptr p) { + capn_resolve(&p.p); +} +void get_TestJoinResult(struct TestJoinResult *s, TestJoinResult_list l, int i) { + TestJoinResult_ptr p; + p.p = capn_getp(l.p, i, 0); + read_TestJoinResult(s, p); +} +void set_TestJoinResult(const struct TestJoinResult *s, TestJoinResult_list l, int i) { + TestJoinResult_ptr p; + p.p = capn_getp(l.p, i, 0); + write_TestJoinResult(s, p); +} + +TestNameAnnotation_ptr new_TestNameAnnotation(struct capn_segment *s) { + TestNameAnnotation_ptr p; + p.p = capn_new_struct(s, 8, 1); + return p; +} +TestNameAnnotation_list new_TestNameAnnotation_list(struct capn_segment *s, int len) { + TestNameAnnotation_list p; + p.p = capn_new_list(s, len, 8, 1); + return p; +} +void read_TestNameAnnotation(struct TestNameAnnotation *s, TestNameAnnotation_ptr p) { + capn_resolve(&p.p); + s->which = (enum TestNameAnnotation_which)(int) capn_read16(p.p, 2); + switch (s->which) { + case TestNameAnnotation_badFieldName: + s->badFieldName = (capn_read8(p.p, 0) & 1) != 0; + break; + case TestNameAnnotation_bar: + s->bar = (int8_t) capn_read8(p.p, 0); + break; + default: + break; + } + s->anotherBadFieldName = (enum TestNameAnnotation_BadlyNamedEnum)(int) capn_read16(p.p, 4); + s->badlyNamedUnion_which = (enum TestNameAnnotation_badlyNamedUnion_which)(int) capn_read16(p.p, 6); + switch (s->badlyNamedUnion_which) { + case TestNameAnnotation_badlyNamedUnion_baz: + s->badlyNamedUnion.baz.p = capn_getp(p.p, 0, 0); + break; + case TestNameAnnotation_badlyNamedUnion_badlyNamedGroup: + break; + default: + break; + } +} +void write_TestNameAnnotation(const struct TestNameAnnotation *s, TestNameAnnotation_ptr p) { + capn_resolve(&p.p); + capn_write16(p.p, 2, s->which); + switch (s->which) { + case TestNameAnnotation_badFieldName: + capn_write1(p.p, 0, s->badFieldName != 0); + break; + case TestNameAnnotation_bar: + capn_write8(p.p, 0, (uint8_t) s->bar); + break; + default: + break; + } + capn_write16(p.p, 4, (uint16_t) s->anotherBadFieldName); + capn_write16(p.p, 6, s->badlyNamedUnion_which); + switch (s->badlyNamedUnion_which) { + case TestNameAnnotation_badlyNamedUnion_baz: + capn_setp(p.p, 0, s->badlyNamedUnion.baz.p); + break; + case TestNameAnnotation_badlyNamedUnion_badlyNamedGroup: + break; + default: + break; + } +} +void get_TestNameAnnotation(struct TestNameAnnotation *s, TestNameAnnotation_list l, int i) { + TestNameAnnotation_ptr p; + p.p = capn_getp(l.p, i, 0); + read_TestNameAnnotation(s, p); +} +void set_TestNameAnnotation(const struct TestNameAnnotation *s, TestNameAnnotation_list l, int i) { + TestNameAnnotation_ptr p; + p.p = capn_getp(l.p, i, 0); + write_TestNameAnnotation(s, p); +} + +TestNameAnnotation_NestedStruct_ptr new_TestNameAnnotation_NestedStruct(struct capn_segment *s) { + TestNameAnnotation_NestedStruct_ptr p; + p.p = capn_new_struct(s, 8, 1); + return p; +} +TestNameAnnotation_NestedStruct_list new_TestNameAnnotation_NestedStruct_list(struct capn_segment *s, int len) { + TestNameAnnotation_NestedStruct_list p; + p.p = capn_new_list(s, len, 8, 1); + return p; +} +void read_TestNameAnnotation_NestedStruct(struct TestNameAnnotation_NestedStruct *s, TestNameAnnotation_NestedStruct_ptr p) { + capn_resolve(&p.p); + s->badNestedFieldName = (capn_read8(p.p, 0) & 1) != 0; + s->anotherBadNestedFieldName.p = capn_getp(p.p, 0, 0); +} +void write_TestNameAnnotation_NestedStruct(const struct TestNameAnnotation_NestedStruct *s, TestNameAnnotation_NestedStruct_ptr p) { + capn_resolve(&p.p); + capn_write1(p.p, 0, s->badNestedFieldName != 0); + capn_setp(p.p, 0, s->anotherBadNestedFieldName.p); +} +void get_TestNameAnnotation_NestedStruct(struct TestNameAnnotation_NestedStruct *s, TestNameAnnotation_NestedStruct_list l, int i) { + TestNameAnnotation_NestedStruct_ptr p; + p.p = capn_getp(l.p, i, 0); + read_TestNameAnnotation_NestedStruct(s, p); +} +void set_TestNameAnnotation_NestedStruct(const struct TestNameAnnotation_NestedStruct *s, TestNameAnnotation_NestedStruct_list l, int i) { + TestNameAnnotation_NestedStruct_ptr p; + p.p = capn_getp(l.p, i, 0); + write_TestNameAnnotation_NestedStruct(s, p); +} diff --git a/compiler/test.capnp.h b/compiler/test.capnp.h index 26dd224..45dec27 100644 --- a/compiler/test.capnp.h +++ b/compiler/test.capnp.h @@ -15,7 +15,7 @@ extern "C" { struct TestAllTypes; struct TestDefaults; -struct TestObject; +struct TestAnyPointer; struct TestOutOfOrder; struct TestUnion; struct TestUnnamedUnion; @@ -47,12 +47,25 @@ struct TestLateUnion; struct TestOldVersion; struct TestNewVersion; struct TestStructUnion; +struct TestStructUnion_SomeStruct; +struct TestPrintInlineStructs; +struct TestPrintInlineStructs_InlineStruct; +struct TestWholeFloatDefault; struct TestEmptyStruct; struct TestConstants; +struct TestSturdyRef; +struct TestSturdyRefHostId; +struct TestSturdyRefObjectId; +struct TestProvisionId; +struct TestRecipientId; +struct TestThirdPartyCapId; +struct TestJoinResult; +struct TestNameAnnotation; +struct TestNameAnnotation_NestedStruct; typedef struct {capn_ptr p;} TestAllTypes_ptr; typedef struct {capn_ptr p;} TestDefaults_ptr; -typedef struct {capn_ptr p;} TestObject_ptr; +typedef struct {capn_ptr p;} TestAnyPointer_ptr; typedef struct {capn_ptr p;} TestOutOfOrder_ptr; typedef struct {capn_ptr p;} TestUnion_ptr; typedef struct {capn_ptr p;} TestUnnamedUnion_ptr; @@ -84,12 +97,25 @@ typedef struct {capn_ptr p;} TestLateUnion_ptr; typedef struct {capn_ptr p;} TestOldVersion_ptr; typedef struct {capn_ptr p;} TestNewVersion_ptr; typedef struct {capn_ptr p;} TestStructUnion_ptr; +typedef struct {capn_ptr p;} TestStructUnion_SomeStruct_ptr; +typedef struct {capn_ptr p;} TestPrintInlineStructs_ptr; +typedef struct {capn_ptr p;} TestPrintInlineStructs_InlineStruct_ptr; +typedef struct {capn_ptr p;} TestWholeFloatDefault_ptr; typedef struct {capn_ptr p;} TestEmptyStruct_ptr; typedef struct {capn_ptr p;} TestConstants_ptr; +typedef struct {capn_ptr p;} TestSturdyRef_ptr; +typedef struct {capn_ptr p;} TestSturdyRefHostId_ptr; +typedef struct {capn_ptr p;} TestSturdyRefObjectId_ptr; +typedef struct {capn_ptr p;} TestProvisionId_ptr; +typedef struct {capn_ptr p;} TestRecipientId_ptr; +typedef struct {capn_ptr p;} TestThirdPartyCapId_ptr; +typedef struct {capn_ptr p;} TestJoinResult_ptr; +typedef struct {capn_ptr p;} TestNameAnnotation_ptr; +typedef struct {capn_ptr p;} TestNameAnnotation_NestedStruct_ptr; typedef struct {capn_ptr p;} TestAllTypes_list; typedef struct {capn_ptr p;} TestDefaults_list; -typedef struct {capn_ptr p;} TestObject_list; +typedef struct {capn_ptr p;} TestAnyPointer_list; typedef struct {capn_ptr p;} TestOutOfOrder_list; typedef struct {capn_ptr p;} TestUnion_list; typedef struct {capn_ptr p;} TestUnnamedUnion_list; @@ -121,8 +147,21 @@ typedef struct {capn_ptr p;} TestLateUnion_list; typedef struct {capn_ptr p;} TestOldVersion_list; typedef struct {capn_ptr p;} TestNewVersion_list; typedef struct {capn_ptr p;} TestStructUnion_list; +typedef struct {capn_ptr p;} TestStructUnion_SomeStruct_list; +typedef struct {capn_ptr p;} TestPrintInlineStructs_list; +typedef struct {capn_ptr p;} TestPrintInlineStructs_InlineStruct_list; +typedef struct {capn_ptr p;} TestWholeFloatDefault_list; typedef struct {capn_ptr p;} TestEmptyStruct_list; typedef struct {capn_ptr p;} TestConstants_list; +typedef struct {capn_ptr p;} TestSturdyRef_list; +typedef struct {capn_ptr p;} TestSturdyRefHostId_list; +typedef struct {capn_ptr p;} TestSturdyRefObjectId_list; +typedef struct {capn_ptr p;} TestProvisionId_list; +typedef struct {capn_ptr p;} TestRecipientId_list; +typedef struct {capn_ptr p;} TestThirdPartyCapId_list; +typedef struct {capn_ptr p;} TestJoinResult_list; +typedef struct {capn_ptr p;} TestNameAnnotation_list; +typedef struct {capn_ptr p;} TestNameAnnotation_NestedStruct_list; enum TestEnum { TestEnum_foo = 0, @@ -145,6 +184,29 @@ enum TestNestedTypes_NestedStruct_NestedEnum { TestNestedTypes_NestedStruct_NestedEnum_qux = 1, TestNestedTypes_NestedStruct_NestedEnum_quux = 2 }; + +enum TestSturdyRefObjectId_Tag { + TestSturdyRefObjectId_Tag_testInterface = 0, + TestSturdyRefObjectId_Tag_testExtends = 1, + TestSturdyRefObjectId_Tag_testPipeline = 2, + TestSturdyRefObjectId_Tag_testTailCallee = 3, + TestSturdyRefObjectId_Tag_testTailCaller = 4, + TestSturdyRefObjectId_Tag_testMoreStuff = 5 +}; + +enum TestNameAnnotation_BadlyNamedEnum { + TestNameAnnotation_BadlyNamedEnum_foo = 0, + TestNameAnnotation_BadlyNamedEnum_bar = 1, + TestNameAnnotation_BadlyNamedEnum_baz = 2 +}; + +enum TestNameAnnotation_NestedStruct_DeeplyNestedEnum { + TestNameAnnotation_NestedStruct_DeeplyNestedEnum_quux = 0, + TestNameAnnotation_NestedStruct_DeeplyNestedEnum_corge = 1, + TestNameAnnotation_NestedStruct_DeeplyNestedEnum_grault = 2 +}; +extern union capn_conv_f32 TestWholeFloatDefault_constant; +extern union capn_conv_f32 TestWholeFloatDefault_bigConstant; extern unsigned TestConstants_boolConst; extern int8_t TestConstants_int8Const; extern int16_t TestConstants_int16Const; @@ -179,6 +241,7 @@ extern capn_list16 TestConstants_enumListConst; extern uint32_t globalInt; extern capn_text globalText; extern TestAllTypes_ptr globalStruct; +extern TestPrintInlineStructs_ptr globalPrintableStruct; extern TestAllTypes_ptr derivedConstant; struct TestAllTypes { @@ -251,8 +314,8 @@ struct TestDefaults { capn_ptr interfaceList; }; -struct TestObject { - capn_ptr objectField; +struct TestAnyPointer { + capn_ptr anyPointerField; }; struct TestOutOfOrder { @@ -637,27 +700,100 @@ struct TestNewVersion { capn_text new2; }; enum TestStructUnion_un_which { - TestStructUnion_un_allTypes = 0, + TestStructUnion_un__struct = 0, TestStructUnion_un_object = 1 }; struct TestStructUnion { enum TestStructUnion_un_which un_which; union { - TestAllTypes_ptr allTypes; - TestObject_ptr object; + TestStructUnion_SomeStruct_ptr _struct; + TestAnyPointer_ptr object; } un; }; +struct TestStructUnion_SomeStruct { + capn_text someText; + capn_text moreText; +}; + +struct TestPrintInlineStructs { + capn_text someText; + TestPrintInlineStructs_InlineStruct_list structList; +}; + +struct TestPrintInlineStructs_InlineStruct { + int32_t int32Field; + capn_text textField; +}; + +struct TestWholeFloatDefault { + float field; + float bigField; +}; + struct TestEmptyStruct { }; struct TestConstants { }; +struct TestSturdyRef { + TestSturdyRefHostId_ptr hostId; + capn_ptr objectId; +}; + +struct TestSturdyRefHostId { + capn_text host; +}; + +struct TestSturdyRefObjectId { + enum TestSturdyRefObjectId_Tag tag; +}; + +struct TestProvisionId { +}; + +struct TestRecipientId { +}; + +struct TestThirdPartyCapId { +}; + +struct TestJoinResult { +}; +enum TestNameAnnotation_which { + TestNameAnnotation_badFieldName = 0, + TestNameAnnotation_bar = 1 +}; +enum TestNameAnnotation_badlyNamedUnion_which { + TestNameAnnotation_badlyNamedUnion_badlyNamedGroup = 0, + TestNameAnnotation_badlyNamedUnion_baz = 1 +}; + +struct TestNameAnnotation { + enum TestNameAnnotation_which which; + union { + unsigned badFieldName : 1; + int8_t bar; + }; + enum TestNameAnnotation_BadlyNamedEnum anotherBadFieldName; + enum TestNameAnnotation_badlyNamedUnion_which badlyNamedUnion_which; + union { + struct { + } badlyNamedGroup; + TestNameAnnotation_NestedStruct_ptr baz; + } badlyNamedUnion; +}; + +struct TestNameAnnotation_NestedStruct { + unsigned badNestedFieldName : 1; + TestNameAnnotation_NestedStruct_ptr anotherBadNestedFieldName; +}; + TestAllTypes_ptr new_TestAllTypes(struct capn_segment*); TestDefaults_ptr new_TestDefaults(struct capn_segment*); -TestObject_ptr new_TestObject(struct capn_segment*); +TestAnyPointer_ptr new_TestAnyPointer(struct capn_segment*); TestOutOfOrder_ptr new_TestOutOfOrder(struct capn_segment*); TestUnion_ptr new_TestUnion(struct capn_segment*); TestUnnamedUnion_ptr new_TestUnnamedUnion(struct capn_segment*); @@ -689,12 +825,25 @@ TestLateUnion_ptr new_TestLateUnion(struct capn_segment*); TestOldVersion_ptr new_TestOldVersion(struct capn_segment*); TestNewVersion_ptr new_TestNewVersion(struct capn_segment*); TestStructUnion_ptr new_TestStructUnion(struct capn_segment*); +TestStructUnion_SomeStruct_ptr new_TestStructUnion_SomeStruct(struct capn_segment*); +TestPrintInlineStructs_ptr new_TestPrintInlineStructs(struct capn_segment*); +TestPrintInlineStructs_InlineStruct_ptr new_TestPrintInlineStructs_InlineStruct(struct capn_segment*); +TestWholeFloatDefault_ptr new_TestWholeFloatDefault(struct capn_segment*); TestEmptyStruct_ptr new_TestEmptyStruct(struct capn_segment*); TestConstants_ptr new_TestConstants(struct capn_segment*); +TestSturdyRef_ptr new_TestSturdyRef(struct capn_segment*); +TestSturdyRefHostId_ptr new_TestSturdyRefHostId(struct capn_segment*); +TestSturdyRefObjectId_ptr new_TestSturdyRefObjectId(struct capn_segment*); +TestProvisionId_ptr new_TestProvisionId(struct capn_segment*); +TestRecipientId_ptr new_TestRecipientId(struct capn_segment*); +TestThirdPartyCapId_ptr new_TestThirdPartyCapId(struct capn_segment*); +TestJoinResult_ptr new_TestJoinResult(struct capn_segment*); +TestNameAnnotation_ptr new_TestNameAnnotation(struct capn_segment*); +TestNameAnnotation_NestedStruct_ptr new_TestNameAnnotation_NestedStruct(struct capn_segment*); TestAllTypes_list new_TestAllTypes_list(struct capn_segment*, int len); TestDefaults_list new_TestDefaults_list(struct capn_segment*, int len); -TestObject_list new_TestObject_list(struct capn_segment*, int len); +TestAnyPointer_list new_TestAnyPointer_list(struct capn_segment*, int len); TestOutOfOrder_list new_TestOutOfOrder_list(struct capn_segment*, int len); TestUnion_list new_TestUnion_list(struct capn_segment*, int len); TestUnnamedUnion_list new_TestUnnamedUnion_list(struct capn_segment*, int len); @@ -726,12 +875,25 @@ TestLateUnion_list new_TestLateUnion_list(struct capn_segment*, int len); TestOldVersion_list new_TestOldVersion_list(struct capn_segment*, int len); TestNewVersion_list new_TestNewVersion_list(struct capn_segment*, int len); TestStructUnion_list new_TestStructUnion_list(struct capn_segment*, int len); +TestStructUnion_SomeStruct_list new_TestStructUnion_SomeStruct_list(struct capn_segment*, int len); +TestPrintInlineStructs_list new_TestPrintInlineStructs_list(struct capn_segment*, int len); +TestPrintInlineStructs_InlineStruct_list new_TestPrintInlineStructs_InlineStruct_list(struct capn_segment*, int len); +TestWholeFloatDefault_list new_TestWholeFloatDefault_list(struct capn_segment*, int len); TestEmptyStruct_list new_TestEmptyStruct_list(struct capn_segment*, int len); TestConstants_list new_TestConstants_list(struct capn_segment*, int len); +TestSturdyRef_list new_TestSturdyRef_list(struct capn_segment*, int len); +TestSturdyRefHostId_list new_TestSturdyRefHostId_list(struct capn_segment*, int len); +TestSturdyRefObjectId_list new_TestSturdyRefObjectId_list(struct capn_segment*, int len); +TestProvisionId_list new_TestProvisionId_list(struct capn_segment*, int len); +TestRecipientId_list new_TestRecipientId_list(struct capn_segment*, int len); +TestThirdPartyCapId_list new_TestThirdPartyCapId_list(struct capn_segment*, int len); +TestJoinResult_list new_TestJoinResult_list(struct capn_segment*, int len); +TestNameAnnotation_list new_TestNameAnnotation_list(struct capn_segment*, int len); +TestNameAnnotation_NestedStruct_list new_TestNameAnnotation_NestedStruct_list(struct capn_segment*, int len); void read_TestAllTypes(struct TestAllTypes*, TestAllTypes_ptr); void read_TestDefaults(struct TestDefaults*, TestDefaults_ptr); -void read_TestObject(struct TestObject*, TestObject_ptr); +void read_TestAnyPointer(struct TestAnyPointer*, TestAnyPointer_ptr); void read_TestOutOfOrder(struct TestOutOfOrder*, TestOutOfOrder_ptr); void read_TestUnion(struct TestUnion*, TestUnion_ptr); void read_TestUnnamedUnion(struct TestUnnamedUnion*, TestUnnamedUnion_ptr); @@ -763,12 +925,25 @@ void read_TestLateUnion(struct TestLateUnion*, TestLateUnion_ptr); void read_TestOldVersion(struct TestOldVersion*, TestOldVersion_ptr); void read_TestNewVersion(struct TestNewVersion*, TestNewVersion_ptr); void read_TestStructUnion(struct TestStructUnion*, TestStructUnion_ptr); +void read_TestStructUnion_SomeStruct(struct TestStructUnion_SomeStruct*, TestStructUnion_SomeStruct_ptr); +void read_TestPrintInlineStructs(struct TestPrintInlineStructs*, TestPrintInlineStructs_ptr); +void read_TestPrintInlineStructs_InlineStruct(struct TestPrintInlineStructs_InlineStruct*, TestPrintInlineStructs_InlineStruct_ptr); +void read_TestWholeFloatDefault(struct TestWholeFloatDefault*, TestWholeFloatDefault_ptr); void read_TestEmptyStruct(struct TestEmptyStruct*, TestEmptyStruct_ptr); void read_TestConstants(struct TestConstants*, TestConstants_ptr); +void read_TestSturdyRef(struct TestSturdyRef*, TestSturdyRef_ptr); +void read_TestSturdyRefHostId(struct TestSturdyRefHostId*, TestSturdyRefHostId_ptr); +void read_TestSturdyRefObjectId(struct TestSturdyRefObjectId*, TestSturdyRefObjectId_ptr); +void read_TestProvisionId(struct TestProvisionId*, TestProvisionId_ptr); +void read_TestRecipientId(struct TestRecipientId*, TestRecipientId_ptr); +void read_TestThirdPartyCapId(struct TestThirdPartyCapId*, TestThirdPartyCapId_ptr); +void read_TestJoinResult(struct TestJoinResult*, TestJoinResult_ptr); +void read_TestNameAnnotation(struct TestNameAnnotation*, TestNameAnnotation_ptr); +void read_TestNameAnnotation_NestedStruct(struct TestNameAnnotation_NestedStruct*, TestNameAnnotation_NestedStruct_ptr); void write_TestAllTypes(const struct TestAllTypes*, TestAllTypes_ptr); void write_TestDefaults(const struct TestDefaults*, TestDefaults_ptr); -void write_TestObject(const struct TestObject*, TestObject_ptr); +void write_TestAnyPointer(const struct TestAnyPointer*, TestAnyPointer_ptr); void write_TestOutOfOrder(const struct TestOutOfOrder*, TestOutOfOrder_ptr); void write_TestUnion(const struct TestUnion*, TestUnion_ptr); void write_TestUnnamedUnion(const struct TestUnnamedUnion*, TestUnnamedUnion_ptr); @@ -800,12 +975,25 @@ void write_TestLateUnion(const struct TestLateUnion*, TestLateUnion_ptr); void write_TestOldVersion(const struct TestOldVersion*, TestOldVersion_ptr); void write_TestNewVersion(const struct TestNewVersion*, TestNewVersion_ptr); void write_TestStructUnion(const struct TestStructUnion*, TestStructUnion_ptr); +void write_TestStructUnion_SomeStruct(const struct TestStructUnion_SomeStruct*, TestStructUnion_SomeStruct_ptr); +void write_TestPrintInlineStructs(const struct TestPrintInlineStructs*, TestPrintInlineStructs_ptr); +void write_TestPrintInlineStructs_InlineStruct(const struct TestPrintInlineStructs_InlineStruct*, TestPrintInlineStructs_InlineStruct_ptr); +void write_TestWholeFloatDefault(const struct TestWholeFloatDefault*, TestWholeFloatDefault_ptr); void write_TestEmptyStruct(const struct TestEmptyStruct*, TestEmptyStruct_ptr); void write_TestConstants(const struct TestConstants*, TestConstants_ptr); +void write_TestSturdyRef(const struct TestSturdyRef*, TestSturdyRef_ptr); +void write_TestSturdyRefHostId(const struct TestSturdyRefHostId*, TestSturdyRefHostId_ptr); +void write_TestSturdyRefObjectId(const struct TestSturdyRefObjectId*, TestSturdyRefObjectId_ptr); +void write_TestProvisionId(const struct TestProvisionId*, TestProvisionId_ptr); +void write_TestRecipientId(const struct TestRecipientId*, TestRecipientId_ptr); +void write_TestThirdPartyCapId(const struct TestThirdPartyCapId*, TestThirdPartyCapId_ptr); +void write_TestJoinResult(const struct TestJoinResult*, TestJoinResult_ptr); +void write_TestNameAnnotation(const struct TestNameAnnotation*, TestNameAnnotation_ptr); +void write_TestNameAnnotation_NestedStruct(const struct TestNameAnnotation_NestedStruct*, TestNameAnnotation_NestedStruct_ptr); void get_TestAllTypes(struct TestAllTypes*, TestAllTypes_list, int i); void get_TestDefaults(struct TestDefaults*, TestDefaults_list, int i); -void get_TestObject(struct TestObject*, TestObject_list, int i); +void get_TestAnyPointer(struct TestAnyPointer*, TestAnyPointer_list, int i); void get_TestOutOfOrder(struct TestOutOfOrder*, TestOutOfOrder_list, int i); void get_TestUnion(struct TestUnion*, TestUnion_list, int i); void get_TestUnnamedUnion(struct TestUnnamedUnion*, TestUnnamedUnion_list, int i); @@ -837,12 +1025,25 @@ void get_TestLateUnion(struct TestLateUnion*, TestLateUnion_list, int i); void get_TestOldVersion(struct TestOldVersion*, TestOldVersion_list, int i); void get_TestNewVersion(struct TestNewVersion*, TestNewVersion_list, int i); void get_TestStructUnion(struct TestStructUnion*, TestStructUnion_list, int i); +void get_TestStructUnion_SomeStruct(struct TestStructUnion_SomeStruct*, TestStructUnion_SomeStruct_list, int i); +void get_TestPrintInlineStructs(struct TestPrintInlineStructs*, TestPrintInlineStructs_list, int i); +void get_TestPrintInlineStructs_InlineStruct(struct TestPrintInlineStructs_InlineStruct*, TestPrintInlineStructs_InlineStruct_list, int i); +void get_TestWholeFloatDefault(struct TestWholeFloatDefault*, TestWholeFloatDefault_list, int i); void get_TestEmptyStruct(struct TestEmptyStruct*, TestEmptyStruct_list, int i); void get_TestConstants(struct TestConstants*, TestConstants_list, int i); +void get_TestSturdyRef(struct TestSturdyRef*, TestSturdyRef_list, int i); +void get_TestSturdyRefHostId(struct TestSturdyRefHostId*, TestSturdyRefHostId_list, int i); +void get_TestSturdyRefObjectId(struct TestSturdyRefObjectId*, TestSturdyRefObjectId_list, int i); +void get_TestProvisionId(struct TestProvisionId*, TestProvisionId_list, int i); +void get_TestRecipientId(struct TestRecipientId*, TestRecipientId_list, int i); +void get_TestThirdPartyCapId(struct TestThirdPartyCapId*, TestThirdPartyCapId_list, int i); +void get_TestJoinResult(struct TestJoinResult*, TestJoinResult_list, int i); +void get_TestNameAnnotation(struct TestNameAnnotation*, TestNameAnnotation_list, int i); +void get_TestNameAnnotation_NestedStruct(struct TestNameAnnotation_NestedStruct*, TestNameAnnotation_NestedStruct_list, int i); void set_TestAllTypes(const struct TestAllTypes*, TestAllTypes_list, int i); void set_TestDefaults(const struct TestDefaults*, TestDefaults_list, int i); -void set_TestObject(const struct TestObject*, TestObject_list, int i); +void set_TestAnyPointer(const struct TestAnyPointer*, TestAnyPointer_list, int i); void set_TestOutOfOrder(const struct TestOutOfOrder*, TestOutOfOrder_list, int i); void set_TestUnion(const struct TestUnion*, TestUnion_list, int i); void set_TestUnnamedUnion(const struct TestUnnamedUnion*, TestUnnamedUnion_list, int i); @@ -874,8 +1075,21 @@ void set_TestLateUnion(const struct TestLateUnion*, TestLateUnion_list, int i); void set_TestOldVersion(const struct TestOldVersion*, TestOldVersion_list, int i); void set_TestNewVersion(const struct TestNewVersion*, TestNewVersion_list, int i); void set_TestStructUnion(const struct TestStructUnion*, TestStructUnion_list, int i); +void set_TestStructUnion_SomeStruct(const struct TestStructUnion_SomeStruct*, TestStructUnion_SomeStruct_list, int i); +void set_TestPrintInlineStructs(const struct TestPrintInlineStructs*, TestPrintInlineStructs_list, int i); +void set_TestPrintInlineStructs_InlineStruct(const struct TestPrintInlineStructs_InlineStruct*, TestPrintInlineStructs_InlineStruct_list, int i); +void set_TestWholeFloatDefault(const struct TestWholeFloatDefault*, TestWholeFloatDefault_list, int i); void set_TestEmptyStruct(const struct TestEmptyStruct*, TestEmptyStruct_list, int i); void set_TestConstants(const struct TestConstants*, TestConstants_list, int i); +void set_TestSturdyRef(const struct TestSturdyRef*, TestSturdyRef_list, int i); +void set_TestSturdyRefHostId(const struct TestSturdyRefHostId*, TestSturdyRefHostId_list, int i); +void set_TestSturdyRefObjectId(const struct TestSturdyRefObjectId*, TestSturdyRefObjectId_list, int i); +void set_TestProvisionId(const struct TestProvisionId*, TestProvisionId_list, int i); +void set_TestRecipientId(const struct TestRecipientId*, TestRecipientId_list, int i); +void set_TestThirdPartyCapId(const struct TestThirdPartyCapId*, TestThirdPartyCapId_list, int i); +void set_TestJoinResult(const struct TestJoinResult*, TestJoinResult_list, int i); +void set_TestNameAnnotation(const struct TestNameAnnotation*, TestNameAnnotation_list, int i); +void set_TestNameAnnotation_NestedStruct(const struct TestNameAnnotation_NestedStruct*, TestNameAnnotation_NestedStruct_list, int i); #ifdef __cplusplus }