@@ -7,27 +7,31 @@ import scala.scalanative.native._
7
7
@ native.extern
8
8
object ReuseBindings {
9
9
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 ]
11
11
def useStruct (p0 : native.Ptr [org.scalanative.bindgen.samples.Struct .struct_point]): Unit = native.extern
12
12
def returnTypedef_point_s (): native.Ptr [org.scalanative.bindgen.samples.Struct .struct_point] = native.extern
13
13
def returnTypedef_point (): native.Ptr [org.scalanative.bindgen.samples.Struct .point] = native.extern
14
14
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
15
16
def getMyInt (): org.scalanative.bindgen.samples.CustomNames .MY_INT = native.extern
16
17
def getEnum (): org.scalanative.bindgen.samples.CustomNames .EnumWithTypedef = native.extern
17
18
18
19
object implicits {
19
20
implicit class struct_usesImportedEnum_ops (val p : native.Ptr [struct_usesImportedEnum]) extends AnyVal {
20
21
def index : org.scalanative.bindgen.samples.Struct .enum_pointIndex = ! p._1
21
22
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
22
25
}
23
26
}
24
27
25
28
object struct_usesImportedEnum {
26
29
import implicits ._
27
30
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] = {
29
32
val ptr = native.alloc[struct_usesImportedEnum]
30
33
ptr.index = index
34
+ ptr.weight = weight
31
35
ptr
32
36
}
33
37
}
0 commit comments