1 package com.acme; 2 3 import java.nicl.metadata.Offset; 4 import java.nicl.metadata.NativeHeader; 5 import java.nicl.metadata.NativeType; 6 import java.nicl.metadata.CallingConvention; 7 import java.nicl.metadata.C; 8 import java.math.BigDecimal; 9 import java.nicl.types.Pointer; 10 import java.nicl.types.Struct; 11 12 /** 13 * This test is platform dependent, as the C type size may vary on platform. 14 * Current value is based on x64 with __LP64__. 15 */ 16 @NativeHeader(headerPath="recursive.h") 17 public interface recursive { 18 19 @C(file="recursive.h", line=1, column=8, USR="") 20 @NativeType(isRecordType=true, layout="[p:[p]]", ctype = "struct Foo", size = 8) 21 public interface Foo extends Struct<Foo> { 22 @C(file="recursive.h", line=2, column=17, USR="") 23 @NativeType(name="p", layout="p:[p:[p]]", ctype="struct Bar *", size=8) 24 @Offset(offset=0) 25 Pointer<Bar> p$get(); 26 void p$set(Pointer<Bar> value); 27 Pointer<Pointer<Bar>> p$ptr(); 28 } 29 30 @C(file = "recursive.h", line=5, column=8, USR="") 31 @NativeType(isRecordType=true, layout="[p:[p]]", ctype = "struct Bar", size = 8) 32 public interface Bar extends Struct<Bar> { 33 @C(file="recursive.h", line=6, column=17, USR="") 34 @NativeType(name="q", layout="p:[p:[p]]", ctype="struct Foo *", size=8) 35 @Offset(offset=0) 36 Pointer<Foo> q$get(); 37 void q$set(Pointer<Foo> value); 38 Pointer<Pointer<Foo>> q$ptr(); 39 } 40 } | 1 package com.acme; 2 3 import java.nicl.metadata.Offset; 4 import java.nicl.metadata.NativeHeader; 5 import java.nicl.metadata.NativeLocation; 6 import java.nicl.metadata.NativeStruct; 7 import java.nicl.metadata.NativeType; 8 import java.math.BigDecimal; 9 import java.nicl.types.Pointer; 10 import java.nicl.types.Struct; 11 12 /** 13 * This test is platform dependent, as the C type size may vary on platform. 14 * Current value is based on x64 with __LP64__. 15 */ 16 @NativeHeader(path="recursive.h") 17 public interface recursive { 18 19 @NativeLocation(file="recursive.h", line=1, column=8, USR="") 20 @NativeStruct("[p:[p]]") 21 @NativeType(layout="[p:[p]]", ctype = "struct Foo") 22 public interface Foo extends Struct<Foo> { 23 @NativeLocation(file="recursive.h", line=2, column=17, USR="") 24 @NativeType(name="p", layout="p:[p:[p]]", ctype="struct Bar *") 25 @Offset(offset=0) 26 Pointer<Bar> p$get(); 27 void p$set(Pointer<Bar> value); 28 Pointer<Pointer<Bar>> p$ptr(); 29 } 30 31 @NativeLocation(file = "recursive.h", line=5, column=8, USR="") 32 @NativeStruct("[p:[p]]") 33 @NativeType(layout="[p:[p]]", ctype = "struct Bar") 34 public interface Bar extends Struct<Bar> { 35 @NativeLocation(file="recursive.h", line=6, column=17, USR="") 36 @NativeType(name="q", layout="p:[p:[p]]", ctype="struct Foo *") 37 @Offset(offset=0) 38 Pointer<Foo> q$get(); 39 void q$set(Pointer<Foo> value); 40 Pointer<Pointer<Foo>> q$ptr(); 41 } 42 } |