1
1
import Foundation
2
2
3
- open class Type : NativeTypeWrapper {
3
+ open class BindingsType : NativeTypeWrapper {
4
4
5
5
private static var instanceCounter : UInt = 0
6
6
internal let instanceNumber : UInt
@@ -14,19 +14,19 @@ open class Type: NativeTypeWrapper {
14
14
/* NATIVE_CALLBACKS_START */
15
15
16
16
func type_idCallback( pointer: UnsafeRawPointer ? ) -> UInt16 {
17
- let instance : Type = Bindings . pointerToInstance ( pointer: pointer!, sourceMarker: " Type .swift::type_id" )
17
+ let instance : BindingsType = Bindings . pointerToInstance ( pointer: pointer!, sourceMarker: " BindingsType .swift::type_id" )
18
18
19
19
return instance. type_id ( )
20
20
}
21
21
22
22
func debug_strCallback( pointer: UnsafeRawPointer ? ) -> LDKStr {
23
- let instance : Type = Bindings . pointerToInstance ( pointer: pointer!, sourceMarker: " Type .swift::debug_str" )
23
+ let instance : BindingsType = Bindings . pointerToInstance ( pointer: pointer!, sourceMarker: " BindingsType .swift::debug_str" )
24
24
25
25
return Bindings . new_LDKStr ( string: instance. debug_str ( ) , chars_is_owned: true )
26
26
}
27
27
28
28
func writeCallback( pointer: UnsafeRawPointer ? ) -> LDKCVec_u8Z {
29
- let instance : Type = Bindings . pointerToInstance ( pointer: pointer!, sourceMarker: " Type .swift::write" )
29
+ let instance : BindingsType = Bindings . pointerToInstance ( pointer: pointer!, sourceMarker: " BindingsType .swift::write" )
30
30
31
31
32
32
let returnWrapper = Bindings . new_LDKCVec_u8ZWrapper ( array: instance. write ( ) )
@@ -38,7 +38,7 @@ open class Type: NativeTypeWrapper {
38
38
}
39
39
40
40
func freeCallback( pointer: UnsafeMutableRawPointer ? ) -> Void {
41
- let instance : Type = Bindings . pointerToInstance ( pointer: pointer!, sourceMarker: " Type .swift::free" )
41
+ let instance : BindingsType = Bindings . pointerToInstance ( pointer: pointer!, sourceMarker: " BindingsType .swift::free" )
42
42
43
43
return instance. free ( )
44
44
}
@@ -93,45 +93,45 @@ open class Type: NativeTypeWrapper {
93
93
94
94
95
95
96
- internal func dangle( ) -> Type {
96
+ internal func dangle( ) -> BindingsType {
97
97
self . dangling = true
98
98
return self
99
99
}
100
100
101
101
deinit {
102
102
if !self . dangling {
103
- Bindings . print ( " Freeing Type \( self . instanceNumber) . " )
103
+ Bindings . print ( " Freeing BindingsType \( self . instanceNumber) . " )
104
104
self . free ( )
105
105
} else {
106
- Bindings . print ( " Not freeing Type \( self . instanceNumber) due to dangle. " )
106
+ Bindings . print ( " Not freeing BindingsType \( self . instanceNumber) due to dangle. " )
107
107
}
108
108
}
109
109
110
110
111
111
open func type_id( ) -> UInt16 {
112
112
/* EDIT ME */
113
- Bindings . print ( " Type ::type_id should be overridden!" , severity: . WARNING)
113
+ Bindings . print ( " BindingsType ::type_id should be overridden!" , severity: . WARNING)
114
114
115
115
return 0
116
116
}
117
117
118
118
open func debug_str( ) -> String {
119
119
/* EDIT ME */
120
- Bindings . print ( " Type ::debug_str MUST be overridden!" , severity: . ERROR)
120
+ Bindings . print ( " BindingsType ::debug_str MUST be overridden!" , severity: . ERROR)
121
121
122
122
abort ( )
123
123
}
124
124
125
125
open func write( ) -> [ UInt8 ] {
126
126
/* EDIT ME */
127
- Bindings . print ( " Type ::write should be overridden!" , severity: . WARNING)
127
+ Bindings . print ( " BindingsType ::write should be overridden!" , severity: . WARNING)
128
128
129
129
return [ UInt8] ( )
130
130
}
131
131
132
132
open func free( ) -> Void {
133
133
/* EDIT ME */
134
- Bindings . print ( " Type ::free should be overridden!" , severity: . WARNING)
134
+ Bindings . print ( " BindingsType ::free should be overridden!" , severity: . WARNING)
135
135
136
136
137
137
}
@@ -141,7 +141,7 @@ return [UInt8]()
141
141
}
142
142
143
143
144
- public class NativelyImplementedType : Type {
144
+ public class NativelyImplementedBindingsType : BindingsType {
145
145
/* SWIFT_DEFAULT_CALLBACKS_START */
146
146
147
147
public override func type_id( ) -> UInt16 {
0 commit comments