We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ab5902 commit b15fdf1Copy full SHA for b15fdf1
lib/truffle/truffle/fiddle_backend.rb
@@ -16,6 +16,15 @@ module Truffle::FiddleBackend
16
LONG_NFI_TYPE = "SINT#{SIZEOF_LONG * 8}"
17
ULONG_NFI_TYPE = "UINT#{SIZEOF_LONG * 8}"
18
19
+ SIZE_T_TYPEDEF = Truffle::Config.lookup('platform.typedef.size_t')
20
+
21
+ case SIZE_T_TYPEDEF
22
+ when 'ulong'
23
+ SIGNEDNESS_OF_SIZE_T = 1
24
+ else
25
+ raise NotImplementedError, "#{SIZE_T_TYPEDEF} not recognised"
26
+ end
27
28
def self.type_to_nfi(type)
29
case type
30
when Fiddle::TYPE_VOID
@@ -96,8 +105,6 @@ def self.convert_native_to_ruby(type, val)
96
105
end
97
106
98
107
99
- SIGNEDNESS_OF_SIZE_T = 1 # platform specific!
100
-
101
108
102
109
103
110
module Fiddle
0 commit comments