@@ -7,27 +7,31 @@ import scala.scalanative.native._
77@ native.extern
88object ReuseBindings {
99 type aliasForBigStruct = org.scalanative.bindgen.samples.Struct .struct_bigStruct
10- type struct_usesImportedEnum = native.CStruct1 [org.scalanative.bindgen.samples.Struct .enum_pointIndex]
10+ type struct_usesImportedEnum = native.CStruct2 [org.scalanative.bindgen.samples.Struct .enum_pointIndex, org.scalanative.bindgen.samples. CustomNames .weight ]
1111 def useStruct (p0 : native.Ptr [org.scalanative.bindgen.samples.Struct .struct_point]): Unit = native.extern
1212 def returnTypedef_point_s (): native.Ptr [org.scalanative.bindgen.samples.Struct .struct_point] = native.extern
1313 def returnTypedef_point (): native.Ptr [org.scalanative.bindgen.samples.Struct .point] = native.extern
1414 def readBook (book : native.Ptr [org.scalanative.bindgen.samples.CustomNames .book]): Unit = native.extern
15+ def getWeight (weight : native.Ptr [org.scalanative.bindgen.samples.CustomNames .weight]): Unit = native.extern
1516 def getMyInt (): org.scalanative.bindgen.samples.CustomNames .MY_INT = native.extern
1617 def getEnum (): org.scalanative.bindgen.samples.CustomNames .EnumWithTypedef = native.extern
1718
1819 object implicits {
1920 implicit class struct_usesImportedEnum_ops (val p : native.Ptr [struct_usesImportedEnum]) extends AnyVal {
2021 def index : org.scalanative.bindgen.samples.Struct .enum_pointIndex = ! p._1
2122 def index_= (value : org.scalanative.bindgen.samples.Struct .enum_pointIndex): Unit = ! p._1 = value
23+ def weight : native.Ptr [org.scalanative.bindgen.samples.CustomNames .weight] = p._2
24+ def weight_= (value : native.Ptr [org.scalanative.bindgen.samples.CustomNames .weight]): Unit = ! p._2 = ! value
2225 }
2326 }
2427
2528 object struct_usesImportedEnum {
2629 import implicits ._
2730 def apply ()(implicit z : native.Zone ): native.Ptr [struct_usesImportedEnum] = native.alloc[struct_usesImportedEnum]
28- def apply (index : org.scalanative.bindgen.samples.Struct .enum_pointIndex)(implicit z : native.Zone ): native.Ptr [struct_usesImportedEnum] = {
31+ def apply (index : org.scalanative.bindgen.samples.Struct .enum_pointIndex, weight : native. Ptr [org.scalanative.bindgen.samples. CustomNames .weight] )(implicit z : native.Zone ): native.Ptr [struct_usesImportedEnum] = {
2932 val ptr = native.alloc[struct_usesImportedEnum]
3033 ptr.index = index
34+ ptr.weight = weight
3135 ptr
3236 }
3337 }
0 commit comments