File tree Expand file tree Collapse file tree 3 files changed +0
-101
lines changed Expand file tree Collapse file tree 3 files changed +0
-101
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ def self.find_type_size(type)
22
22
end
23
23
24
24
module Platform
25
- CPU = RbConfig ::CONFIG [ 'host_cpu' ]
26
25
# eregon: I would like to use rbconfig/sizeof here, but the linker requires
27
26
# ffi, and the linker is needed to build the rbconfig/sizeof C extension,
28
27
# so we need to break the cycle.
@@ -35,7 +34,6 @@ module Platform
35
34
36
35
# Require the pure-Ruby Truffle NFI backend
37
36
require_relative 'truffle/ffi_backend/last_error'
38
- require_relative 'truffle/ffi_backend/data_converter'
39
37
require_relative 'truffle/ffi_backend/type'
40
38
require_relative 'truffle/ffi_backend/struct_layout'
41
39
require_relative 'truffle/ffi_backend/struct'
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -200,35 +200,4 @@ def to_s
200
200
alias_method :to_str , :to_s
201
201
end
202
202
end
203
-
204
- class StructByReference
205
- include DataConverter
206
-
207
- attr_reader :struct_class
208
-
209
- def initialize ( struct_class )
210
- unless Class === struct_class and struct_class < FFI ::Struct
211
- raise TypeError , 'wrong type (expected subclass of FFI::Struct)'
212
- end
213
- @struct_class = struct_class
214
- end
215
-
216
- def native_type
217
- FFI ::Type ::POINTER
218
- end
219
-
220
- def to_native ( value , ctx )
221
- return Pointer ::NULL if value . nil?
222
-
223
- unless @struct_class === value
224
- raise TypeError , "wrong argument type #{ value . class } (expected #{ @struct_class } )"
225
- end
226
-
227
- value . pointer
228
- end
229
-
230
- def from_native ( value , ctx )
231
- @struct_class . new ( value )
232
- end
233
- end
234
203
end
You can’t perform that action at this time.
0 commit comments