ffi 1.13.0-x64-mingw32 → 1.15.0-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +75 -0
- data/Gemfile +1 -4
- data/README.md +10 -2
- data/Rakefile +23 -23
- data/ffi.gemspec +1 -1
- data/lib/2.3/ffi_c.so +0 -0
- data/lib/2.4/ffi_c.so +0 -0
- data/lib/2.5/ffi_c.so +0 -0
- data/lib/2.6/ffi_c.so +0 -0
- data/lib/2.7/ffi_c.so +0 -0
- data/lib/3.0/ffi_c.so +0 -0
- data/lib/ffi.rb +2 -2
- data/lib/ffi/abstract_memory.rb +44 -0
- data/lib/ffi/autopointer.rb +1 -1
- data/lib/ffi/ffi.rb +1 -0
- data/lib/ffi/io.rb +3 -3
- data/lib/ffi/library.rb +1 -1
- data/lib/ffi/managedstruct.rb +2 -2
- data/lib/ffi/platform.rb +20 -7
- data/lib/ffi/platform/aarch64-darwin/types.conf +130 -0
- data/lib/ffi/platform/aarch64-openbsd/types.conf +134 -0
- data/lib/ffi/platform/powerpc64le-linux/types.conf +100 -0
- data/lib/ffi/platform/riscv64-linux/types.conf +104 -0
- data/lib/ffi/platform/x86_64-dragonflybsd/types.conf +4 -22
- data/lib/ffi/platform/x86_64-haiku/types.conf +117 -0
- data/lib/ffi/platform/x86_64-msys/types.conf +119 -0
- data/lib/ffi/pointer.rb +2 -2
- data/lib/ffi/variadic.rb +1 -10
- data/lib/ffi/version.rb +1 -1
- data/rakelib/ffi_gem_helper.rb +65 -0
- metadata +13 -10
- data/.appveyor.yml +0 -30
- data/.github/workflows/ci.yml +0 -64
- data/.gitignore +0 -25
- data/.gitmodules +0 -4
- data/.travis.yml +0 -58
- data/.yardopts +0 -5
@@ -1,9 +1,7 @@
|
|
1
1
|
rbx.platform.typedef.*) = pointer
|
2
|
-
rbx.platform.typedef.
|
3
|
-
rbx.platform.typedef.__char32_t = uint
|
2
|
+
rbx.platform.typedef.___wchar_t = int
|
4
3
|
rbx.platform.typedef.__clock_t = ulong
|
5
4
|
rbx.platform.typedef.__clockid_t = ulong
|
6
|
-
rbx.platform.typedef.__ct_rune_t = int
|
7
5
|
rbx.platform.typedef.__fd_mask = ulong
|
8
6
|
rbx.platform.typedef.__int16_t = short
|
9
7
|
rbx.platform.typedef.__int32_t = int
|
@@ -17,16 +15,14 @@ rbx.platform.typedef.__int_least16_t = short
|
|
17
15
|
rbx.platform.typedef.__int_least32_t = int
|
18
16
|
rbx.platform.typedef.__int_least64_t = long
|
19
17
|
rbx.platform.typedef.__int_least8_t = char
|
18
|
+
rbx.platform.typedef.__intlp_t = long
|
20
19
|
rbx.platform.typedef.__intmax_t = long
|
21
20
|
rbx.platform.typedef.__intptr_t = long
|
22
|
-
rbx.platform.typedef.__nl_item = int
|
23
21
|
rbx.platform.typedef.__off_t = long
|
24
22
|
rbx.platform.typedef.__pid_t = int
|
25
23
|
rbx.platform.typedef.__ptrdiff_t = long
|
26
24
|
rbx.platform.typedef.__register_t = long
|
27
25
|
rbx.platform.typedef.__rlim_t = long
|
28
|
-
rbx.platform.typedef.__rune_t = int
|
29
|
-
rbx.platform.typedef.__segsz_t = long
|
30
26
|
rbx.platform.typedef.__sig_atomic_t = int
|
31
27
|
rbx.platform.typedef.__size_t = ulong
|
32
28
|
rbx.platform.typedef.__socklen_t = uint
|
@@ -34,7 +30,6 @@ rbx.platform.typedef.__ssize_t = long
|
|
34
30
|
rbx.platform.typedef.__suseconds_t = long
|
35
31
|
rbx.platform.typedef.__time_t = long
|
36
32
|
rbx.platform.typedef.__timer_t = int
|
37
|
-
rbx.platform.typedef.__u_register_t = ulong
|
38
33
|
rbx.platform.typedef.__uint16_t = ushort
|
39
34
|
rbx.platform.typedef.__uint32_t = uint
|
40
35
|
rbx.platform.typedef.__uint64_t = ulong
|
@@ -47,9 +42,9 @@ rbx.platform.typedef.__uint_least16_t = ushort
|
|
47
42
|
rbx.platform.typedef.__uint_least32_t = uint
|
48
43
|
rbx.platform.typedef.__uint_least64_t = ulong
|
49
44
|
rbx.platform.typedef.__uint_least8_t = uchar
|
45
|
+
rbx.platform.typedef.__uintlp_t = ulong
|
50
46
|
rbx.platform.typedef.__uintmax_t = ulong
|
51
47
|
rbx.platform.typedef.__uintptr_t = ulong
|
52
|
-
rbx.platform.typedef.__wchar_t = int
|
53
48
|
rbx.platform.typedef.__wint_t = int
|
54
49
|
rbx.platform.typedef.blkcnt_t = long
|
55
50
|
rbx.platform.typedef.blksize_t = long
|
@@ -57,7 +52,6 @@ rbx.platform.typedef.c_caddr_t = pointer
|
|
57
52
|
rbx.platform.typedef.caddr_t = string
|
58
53
|
rbx.platform.typedef.clock_t = ulong
|
59
54
|
rbx.platform.typedef.clockid_t = ulong
|
60
|
-
rbx.platform.typedef.cpulock_t = uint
|
61
55
|
rbx.platform.typedef.daddr_t = int
|
62
56
|
rbx.platform.typedef.dev_t = uint
|
63
57
|
rbx.platform.typedef.fixpt_t = uint
|
@@ -85,14 +79,9 @@ rbx.platform.typedef.intptr_t = long
|
|
85
79
|
rbx.platform.typedef.key_t = long
|
86
80
|
rbx.platform.typedef.lwpid_t = int
|
87
81
|
rbx.platform.typedef.mode_t = ushort
|
88
|
-
rbx.platform.typedef.mqd_t = int
|
89
82
|
rbx.platform.typedef.nlink_t = uint
|
90
83
|
rbx.platform.typedef.off_t = long
|
91
|
-
rbx.platform.typedef.pd_entry_t = ulong
|
92
|
-
rbx.platform.typedef.pdp_entry_t = ulong
|
93
84
|
rbx.platform.typedef.pid_t = int
|
94
|
-
rbx.platform.typedef.pml4_entry_t = ulong
|
95
|
-
rbx.platform.typedef.pt_entry_t = ulong
|
96
85
|
rbx.platform.typedef.pthread_key_t = int
|
97
86
|
rbx.platform.typedef.ptrdiff_t = long
|
98
87
|
rbx.platform.typedef.qaddr_t = pointer
|
@@ -116,7 +105,6 @@ rbx.platform.typedef.u_int64_t = ulong
|
|
116
105
|
rbx.platform.typedef.u_int8_t = uchar
|
117
106
|
rbx.platform.typedef.u_long = ulong
|
118
107
|
rbx.platform.typedef.u_quad_t = ulong
|
119
|
-
rbx.platform.typedef.u_register_t = ulong
|
120
108
|
rbx.platform.typedef.u_short = ushort
|
121
109
|
rbx.platform.typedef.uid_t = uint
|
122
110
|
rbx.platform.typedef.uint = uint
|
@@ -139,10 +127,4 @@ rbx.platform.typedef.unchar = uchar
|
|
139
127
|
rbx.platform.typedef.useconds_t = uint
|
140
128
|
rbx.platform.typedef.ushort = ushort
|
141
129
|
rbx.platform.typedef.v_caddr_t = pointer
|
142
|
-
rbx.platform.typedef.
|
143
|
-
rbx.platform.typedef.vm_ooffset_t = long
|
144
|
-
rbx.platform.typedef.vm_paddr_t = ulong
|
145
|
-
rbx.platform.typedef.vm_pindex_t = ulong
|
146
|
-
rbx.platform.typedef.vm_poff_t = ulong
|
147
|
-
rbx.platform.typedef.vm_size_t = ulong
|
148
|
-
rbx.platform.typedef.vm_spindex_t = ulong
|
130
|
+
rbx.platform.typedef.wchar_t = int
|
@@ -0,0 +1,117 @@
|
|
1
|
+
rbx.platform.typedef.__haiku_addr_t = ulong
|
2
|
+
rbx.platform.typedef.__haiku_generic_addr_t = ulong
|
3
|
+
rbx.platform.typedef.__haiku_int16 = short
|
4
|
+
rbx.platform.typedef.__haiku_int32 = int
|
5
|
+
rbx.platform.typedef.__haiku_int64 = long
|
6
|
+
rbx.platform.typedef.__haiku_int8 = char
|
7
|
+
rbx.platform.typedef.__haiku_phys_addr_t = ulong
|
8
|
+
rbx.platform.typedef.__haiku_phys_saddr_t = long
|
9
|
+
rbx.platform.typedef.__haiku_saddr_t = long
|
10
|
+
rbx.platform.typedef.__haiku_std_int16 = short
|
11
|
+
rbx.platform.typedef.__haiku_std_int32 = int
|
12
|
+
rbx.platform.typedef.__haiku_std_int64 = long
|
13
|
+
rbx.platform.typedef.__haiku_std_int8 = char
|
14
|
+
rbx.platform.typedef.__haiku_std_uint16 = ushort
|
15
|
+
rbx.platform.typedef.__haiku_std_uint32 = uint
|
16
|
+
rbx.platform.typedef.__haiku_std_uint64 = ulong
|
17
|
+
rbx.platform.typedef.__haiku_std_uint8 = uchar
|
18
|
+
rbx.platform.typedef.__haiku_uint16 = ushort
|
19
|
+
rbx.platform.typedef.__haiku_uint32 = uint
|
20
|
+
rbx.platform.typedef.__haiku_uint64 = ulong
|
21
|
+
rbx.platform.typedef.__haiku_uint8 = uchar
|
22
|
+
rbx.platform.typedef.addr_t = ulong
|
23
|
+
rbx.platform.typedef.bigtime_t = long
|
24
|
+
rbx.platform.typedef.blkcnt_t = long
|
25
|
+
rbx.platform.typedef.blksize_t = int
|
26
|
+
rbx.platform.typedef.caddr_t = pointer
|
27
|
+
rbx.platform.typedef.clock_t = int
|
28
|
+
rbx.platform.typedef.clockid_t = int
|
29
|
+
rbx.platform.typedef.cnt_t = int
|
30
|
+
rbx.platform.typedef.daddr_t = long
|
31
|
+
rbx.platform.typedef.dev_t = int
|
32
|
+
rbx.platform.typedef.fd_mask = uint
|
33
|
+
rbx.platform.typedef.fsblkcnt_t = long
|
34
|
+
rbx.platform.typedef.fsfilcnt_t = long
|
35
|
+
rbx.platform.typedef.generic_addr_t = ulong
|
36
|
+
rbx.platform.typedef.generic_size_t = ulong
|
37
|
+
rbx.platform.typedef.gid_t = uint
|
38
|
+
rbx.platform.typedef.id_t = int
|
39
|
+
rbx.platform.typedef.in_addr_t = uint
|
40
|
+
rbx.platform.typedef.in_port_t = ushort
|
41
|
+
rbx.platform.typedef.ino_t = long
|
42
|
+
rbx.platform.typedef.int16 = short
|
43
|
+
rbx.platform.typedef.int16_t = short
|
44
|
+
rbx.platform.typedef.int32 = int
|
45
|
+
rbx.platform.typedef.int32_t = int
|
46
|
+
rbx.platform.typedef.int64 = long
|
47
|
+
rbx.platform.typedef.int64_t = long
|
48
|
+
rbx.platform.typedef.int8 = char
|
49
|
+
rbx.platform.typedef.int8_t = char
|
50
|
+
rbx.platform.typedef.int_fast16_t = int
|
51
|
+
rbx.platform.typedef.int_fast32_t = int
|
52
|
+
rbx.platform.typedef.int_fast64_t = long
|
53
|
+
rbx.platform.typedef.int_fast8_t = int
|
54
|
+
rbx.platform.typedef.int_least16_t = short
|
55
|
+
rbx.platform.typedef.int_least32_t = int
|
56
|
+
rbx.platform.typedef.int_least64_t = long
|
57
|
+
rbx.platform.typedef.int_least8_t = char
|
58
|
+
rbx.platform.typedef.intmax_t = long
|
59
|
+
rbx.platform.typedef.intptr_t = long
|
60
|
+
rbx.platform.typedef.key_t = int
|
61
|
+
rbx.platform.typedef.mode_t = uint
|
62
|
+
rbx.platform.typedef.nanotime_t = long
|
63
|
+
rbx.platform.typedef.nlink_t = int
|
64
|
+
rbx.platform.typedef.off_t = long
|
65
|
+
rbx.platform.typedef.perform_code = uint
|
66
|
+
rbx.platform.typedef.phys_addr_t = ulong
|
67
|
+
rbx.platform.typedef.phys_size_t = ulong
|
68
|
+
rbx.platform.typedef.pid_t = int
|
69
|
+
rbx.platform.typedef.pthread_key_t = int
|
70
|
+
rbx.platform.typedef.ptrdiff_t = long
|
71
|
+
rbx.platform.typedef.rlim_t = ulong
|
72
|
+
rbx.platform.typedef.sa_family_t = uchar
|
73
|
+
rbx.platform.typedef.sig_atomic_t = int
|
74
|
+
rbx.platform.typedef.sigset_t = ulong
|
75
|
+
rbx.platform.typedef.size_t = ulong
|
76
|
+
rbx.platform.typedef.socklen_t = uint
|
77
|
+
rbx.platform.typedef.status_t = int
|
78
|
+
rbx.platform.typedef.suseconds_t = int
|
79
|
+
rbx.platform.typedef.time_t = long
|
80
|
+
rbx.platform.typedef.type_code = uint
|
81
|
+
rbx.platform.typedef.u_char = uchar
|
82
|
+
rbx.platform.typedef.u_int = uint
|
83
|
+
rbx.platform.typedef.u_int16_t = ushort
|
84
|
+
rbx.platform.typedef.u_int32_t = uint
|
85
|
+
rbx.platform.typedef.u_int64_t = ulong
|
86
|
+
rbx.platform.typedef.u_int8_t = uchar
|
87
|
+
rbx.platform.typedef.u_long = ulong
|
88
|
+
rbx.platform.typedef.u_short = ushort
|
89
|
+
rbx.platform.typedef.uchar = uchar
|
90
|
+
rbx.platform.typedef.uid_t = uint
|
91
|
+
rbx.platform.typedef.uint = uint
|
92
|
+
rbx.platform.typedef.uint16 = ushort
|
93
|
+
rbx.platform.typedef.uint16_t = ushort
|
94
|
+
rbx.platform.typedef.uint32 = uint
|
95
|
+
rbx.platform.typedef.uint32_t = uint
|
96
|
+
rbx.platform.typedef.uint64 = ulong
|
97
|
+
rbx.platform.typedef.uint64_t = ulong
|
98
|
+
rbx.platform.typedef.uint8 = uchar
|
99
|
+
rbx.platform.typedef.uint8_t = uchar
|
100
|
+
rbx.platform.typedef.uint_fast16_t = uint
|
101
|
+
rbx.platform.typedef.uint_fast32_t = uint
|
102
|
+
rbx.platform.typedef.uint_fast64_t = ulong
|
103
|
+
rbx.platform.typedef.uint_fast8_t = uint
|
104
|
+
rbx.platform.typedef.uint_least16_t = ushort
|
105
|
+
rbx.platform.typedef.uint_least32_t = uint
|
106
|
+
rbx.platform.typedef.uint_least64_t = ulong
|
107
|
+
rbx.platform.typedef.uint_least8_t = uchar
|
108
|
+
rbx.platform.typedef.uintmax_t = ulong
|
109
|
+
rbx.platform.typedef.uintptr_t = ulong
|
110
|
+
rbx.platform.typedef.ulong = ulong
|
111
|
+
rbx.platform.typedef.umode_t = uint
|
112
|
+
rbx.platform.typedef.unchar = uchar
|
113
|
+
rbx.platform.typedef.unichar = ushort
|
114
|
+
rbx.platform.typedef.useconds_t = uint
|
115
|
+
rbx.platform.typedef.ushort = ushort
|
116
|
+
rbx.platform.typedef.void*) = pointer
|
117
|
+
rbx.platform.typedef.wchar_t = int
|
@@ -0,0 +1,119 @@
|
|
1
|
+
rbx.platform.typedef.*addr_t = char
|
2
|
+
rbx.platform.typedef.__ULong = uint
|
3
|
+
rbx.platform.typedef.__blkcnt_t = long
|
4
|
+
rbx.platform.typedef.__blksize_t = int
|
5
|
+
rbx.platform.typedef.__clock_t = ulong
|
6
|
+
rbx.platform.typedef.__clockid_t = ulong
|
7
|
+
rbx.platform.typedef.__cpu_mask = ulong
|
8
|
+
rbx.platform.typedef.__dev_t = uint
|
9
|
+
rbx.platform.typedef.__fsblkcnt_t = ulong
|
10
|
+
rbx.platform.typedef.__fsfilcnt_t = ulong
|
11
|
+
rbx.platform.typedef.__gid_t = uint
|
12
|
+
rbx.platform.typedef.__id_t = uint
|
13
|
+
rbx.platform.typedef.__ino_t = ulong
|
14
|
+
rbx.platform.typedef.__int32_t = int
|
15
|
+
rbx.platform.typedef.__int64_t = long
|
16
|
+
rbx.platform.typedef.__int8_t = char
|
17
|
+
rbx.platform.typedef.__int_least32_t = int
|
18
|
+
rbx.platform.typedef.__int_least64_t = long
|
19
|
+
rbx.platform.typedef.__int_least8_t = char
|
20
|
+
rbx.platform.typedef.__intmax_t = long
|
21
|
+
rbx.platform.typedef.__intptr_t = long
|
22
|
+
rbx.platform.typedef.__key_t = long_long
|
23
|
+
rbx.platform.typedef.__loff_t = long_long
|
24
|
+
rbx.platform.typedef.__mode_t = uint
|
25
|
+
rbx.platform.typedef.__nl_item = int
|
26
|
+
rbx.platform.typedef.__nlink_t = ushort
|
27
|
+
rbx.platform.typedef.__off_t = long
|
28
|
+
rbx.platform.typedef.__pid_t = int
|
29
|
+
rbx.platform.typedef.__sigset_t = ulong
|
30
|
+
rbx.platform.typedef.__size_t = ulong
|
31
|
+
rbx.platform.typedef.__socklen_t = int
|
32
|
+
rbx.platform.typedef.__suseconds_t = long
|
33
|
+
rbx.platform.typedef.__time_t = long
|
34
|
+
rbx.platform.typedef.__timer_t = ulong
|
35
|
+
rbx.platform.typedef.__uid_t = uint
|
36
|
+
rbx.platform.typedef.__uint32_t = uint
|
37
|
+
rbx.platform.typedef.__uint64_t = ulong
|
38
|
+
rbx.platform.typedef.__uint8_t = uchar
|
39
|
+
rbx.platform.typedef.__uint_least32_t = uint
|
40
|
+
rbx.platform.typedef.__uint_least64_t = ulong
|
41
|
+
rbx.platform.typedef.__uint_least8_t = uchar
|
42
|
+
rbx.platform.typedef.__uintmax_t = ulong
|
43
|
+
rbx.platform.typedef.__uintptr_t = ulong
|
44
|
+
rbx.platform.typedef.__useconds_t = ulong
|
45
|
+
rbx.platform.typedef._fpos64_t = long_long
|
46
|
+
rbx.platform.typedef._fpos_t = long
|
47
|
+
rbx.platform.typedef._off64_t = long_long
|
48
|
+
rbx.platform.typedef._off_t = long
|
49
|
+
rbx.platform.typedef.blkcnt_t = long
|
50
|
+
rbx.platform.typedef.blksize_t = int
|
51
|
+
rbx.platform.typedef.caddr_t = string
|
52
|
+
rbx.platform.typedef.clock_t = ulong
|
53
|
+
rbx.platform.typedef.clockid_t = ulong
|
54
|
+
rbx.platform.typedef.daddr_t = long
|
55
|
+
rbx.platform.typedef.dev_t = uint
|
56
|
+
rbx.platform.typedef.fd_mask = ulong
|
57
|
+
rbx.platform.typedef.fsblkcnt_t = ulong
|
58
|
+
rbx.platform.typedef.fsfilcnt_t = ulong
|
59
|
+
rbx.platform.typedef.gid_t = uint
|
60
|
+
rbx.platform.typedef.id_t = uint
|
61
|
+
rbx.platform.typedef.in_addr_t = uint
|
62
|
+
rbx.platform.typedef.ino_t = ulong
|
63
|
+
rbx.platform.typedef.int32_t = int
|
64
|
+
rbx.platform.typedef.int64_t = long
|
65
|
+
rbx.platform.typedef.int8_t = char
|
66
|
+
rbx.platform.typedef.int_fast16_t = long
|
67
|
+
rbx.platform.typedef.int_fast32_t = long
|
68
|
+
rbx.platform.typedef.int_fast64_t = long
|
69
|
+
rbx.platform.typedef.int_fast8_t = char
|
70
|
+
rbx.platform.typedef.int_least32_t = int
|
71
|
+
rbx.platform.typedef.int_least64_t = long
|
72
|
+
rbx.platform.typedef.int_least8_t = char
|
73
|
+
rbx.platform.typedef.intmax_t = long
|
74
|
+
rbx.platform.typedef.intptr_t = long
|
75
|
+
rbx.platform.typedef.key_t = long_long
|
76
|
+
rbx.platform.typedef.loff_t = long_long
|
77
|
+
rbx.platform.typedef.mode_t = uint
|
78
|
+
rbx.platform.typedef.nlink_t = ushort
|
79
|
+
rbx.platform.typedef.off_t = long
|
80
|
+
rbx.platform.typedef.pid_t = int
|
81
|
+
rbx.platform.typedef.ptrdiff_t = long
|
82
|
+
rbx.platform.typedef.register_t = long
|
83
|
+
rbx.platform.typedef.rlim_t = ulong
|
84
|
+
rbx.platform.typedef.sbintime_t = long
|
85
|
+
rbx.platform.typedef.sig_atomic_t = int
|
86
|
+
rbx.platform.typedef.sigset_t = ulong
|
87
|
+
rbx.platform.typedef.size_t = ulong
|
88
|
+
rbx.platform.typedef.socklen_t = int
|
89
|
+
rbx.platform.typedef.suseconds_t = long
|
90
|
+
rbx.platform.typedef.time_t = long
|
91
|
+
rbx.platform.typedef.timer_t = ulong
|
92
|
+
rbx.platform.typedef.u_char = uchar
|
93
|
+
rbx.platform.typedef.u_int = uint
|
94
|
+
rbx.platform.typedef.u_int32_t = uint
|
95
|
+
rbx.platform.typedef.u_int64_t = ulong
|
96
|
+
rbx.platform.typedef.u_int8_t = uchar
|
97
|
+
rbx.platform.typedef.u_long = ulong
|
98
|
+
rbx.platform.typedef.u_register_t = ulong
|
99
|
+
rbx.platform.typedef.u_short = ushort
|
100
|
+
rbx.platform.typedef.uid_t = uint
|
101
|
+
rbx.platform.typedef.uint = uint
|
102
|
+
rbx.platform.typedef.uint32_t = uint
|
103
|
+
rbx.platform.typedef.uint64_t = ulong
|
104
|
+
rbx.platform.typedef.uint8_t = uchar
|
105
|
+
rbx.platform.typedef.uint_fast16_t = ulong
|
106
|
+
rbx.platform.typedef.uint_fast32_t = ulong
|
107
|
+
rbx.platform.typedef.uint_fast64_t = ulong
|
108
|
+
rbx.platform.typedef.uint_fast8_t = uchar
|
109
|
+
rbx.platform.typedef.uint_least32_t = uint
|
110
|
+
rbx.platform.typedef.uint_least64_t = ulong
|
111
|
+
rbx.platform.typedef.uint_least8_t = uchar
|
112
|
+
rbx.platform.typedef.uintmax_t = ulong
|
113
|
+
rbx.platform.typedef.uintptr_t = ulong
|
114
|
+
rbx.platform.typedef.ulong = ulong
|
115
|
+
rbx.platform.typedef.useconds_t = ulong
|
116
|
+
rbx.platform.typedef.ushort = ushort
|
117
|
+
rbx.platform.typedef.vm_offset_t = ulong
|
118
|
+
rbx.platform.typedef.vm_size_t = ulong
|
119
|
+
rbx.platform.typedef.wint_t = uint
|
data/lib/ffi/pointer.rb
CHANGED
@@ -52,7 +52,7 @@ module FFI
|
|
52
52
|
|
53
53
|
# @param [nil,Numeric] len length of string to return
|
54
54
|
# @return [String]
|
55
|
-
# Read pointer's contents as a string, or the first +len+ bytes of the
|
55
|
+
# Read pointer's contents as a string, or the first +len+ bytes of the
|
56
56
|
# equivalent string if +len+ is not +nil+.
|
57
57
|
def read_string(len=nil)
|
58
58
|
if len
|
@@ -96,7 +96,7 @@ module FFI
|
|
96
96
|
# @param [String] str string to write
|
97
97
|
# @param [Numeric] len length of string to return
|
98
98
|
# @return [self]
|
99
|
-
# Write +str+ in pointer's contents, or first +len+ bytes if
|
99
|
+
# Write +str+ in pointer's contents, or first +len+ bytes if
|
100
100
|
# +len+ is not +nil+.
|
101
101
|
def write_string(str, len=nil)
|
102
102
|
len = str.bytesize unless len
|
data/lib/ffi/variadic.rb
CHANGED
@@ -31,16 +31,7 @@
|
|
31
31
|
#
|
32
32
|
|
33
33
|
module FFI
|
34
|
-
class VariadicInvoker
|
35
|
-
def init(arg_types, type_map)
|
36
|
-
@fixed = Array.new
|
37
|
-
@type_map = type_map
|
38
|
-
arg_types.each_with_index do |type, i|
|
39
|
-
@fixed << type unless type == Type::VARARGS
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
|
34
|
+
class VariadicInvoker
|
44
35
|
def call(*args, &block)
|
45
36
|
param_types = Array.new(@fixed)
|
46
37
|
param_values = Array.new
|
data/lib/ffi/version.rb
CHANGED
@@ -0,0 +1,65 @@
|
|
1
|
+
require 'bundler'
|
2
|
+
require 'bundler/gem_helper'
|
3
|
+
|
4
|
+
class FfiGemHelper < Bundler::GemHelper
|
5
|
+
attr_accessor :cross_platforms
|
6
|
+
|
7
|
+
def install
|
8
|
+
super
|
9
|
+
|
10
|
+
task "release:guard_clean" => ["release:update_history"]
|
11
|
+
|
12
|
+
task "release:update_history" do
|
13
|
+
update_history
|
14
|
+
end
|
15
|
+
|
16
|
+
task "release:rubygem_push" => ["gem:windows", "gem:java"]
|
17
|
+
end
|
18
|
+
|
19
|
+
def hfile
|
20
|
+
"CHANGELOG.md"
|
21
|
+
end
|
22
|
+
|
23
|
+
def headline
|
24
|
+
'([^\w]*)(\d+\.\d+\.\d+(?:\.\w+)?)([^\w]+)([2Y][0Y][0-9Y][0-9Y]-[0-1M][0-9M]-[0-3D][0-9D])([^\w]*|$)'
|
25
|
+
end
|
26
|
+
|
27
|
+
def reldate
|
28
|
+
Time.now.strftime("%Y-%m-%d")
|
29
|
+
end
|
30
|
+
|
31
|
+
def update_history
|
32
|
+
hin = File.read(hfile)
|
33
|
+
hout = hin.sub(/#{headline}/) do
|
34
|
+
raise "#{hfile} isn't up-to-date for version #{version}" unless $2==version.to_s
|
35
|
+
$1 + $2 + $3 + reldate + $5
|
36
|
+
end
|
37
|
+
if hout != hin
|
38
|
+
Bundler.ui.confirm "Updating #{hfile} for release."
|
39
|
+
File.write(hfile, hout)
|
40
|
+
Rake::FileUtilsExt.sh "git", "commit", hfile, "-m", "Update release date in #{hfile}"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def tag_version
|
45
|
+
Bundler.ui.confirm "Tag release with annotation:"
|
46
|
+
m = File.read(hfile).match(/(?<annotation>#{headline}.*?)#{headline}/m) || raise("Unable to find release notes in #{hfile}")
|
47
|
+
Bundler.ui.info(m[:annotation].gsub(/^/, " "))
|
48
|
+
IO.popen(["git", "tag", "--file=-", version_tag], "w") do |fd|
|
49
|
+
fd.write m[:annotation]
|
50
|
+
end
|
51
|
+
yield if block_given?
|
52
|
+
rescue
|
53
|
+
Bundler.ui.error "Untagging #{version_tag} due to error."
|
54
|
+
sh_with_code "git tag -d #{version_tag}"
|
55
|
+
raise
|
56
|
+
end
|
57
|
+
|
58
|
+
def rubygem_push(path)
|
59
|
+
cross_platforms.each do |ruby_platform|
|
60
|
+
super(path.gsub(/\.gem\z/, "-#{ruby_platform}.gem"))
|
61
|
+
end
|
62
|
+
super(path.gsub(/\.gem\z/, "-java.gem"))
|
63
|
+
super(path)
|
64
|
+
end
|
65
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.15.0
|
5
5
|
platform: x64-mingw32
|
6
6
|
authors:
|
7
7
|
- Wayne Meissner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -86,12 +86,6 @@ executables: []
|
|
86
86
|
extensions: []
|
87
87
|
extra_rdoc_files: []
|
88
88
|
files:
|
89
|
-
- ".appveyor.yml"
|
90
|
-
- ".github/workflows/ci.yml"
|
91
|
-
- ".gitignore"
|
92
|
-
- ".gitmodules"
|
93
|
-
- ".travis.yml"
|
94
|
-
- ".yardopts"
|
95
89
|
- CHANGELOG.md
|
96
90
|
- COPYING
|
97
91
|
- Gemfile
|
@@ -105,7 +99,9 @@ files:
|
|
105
99
|
- lib/2.5/ffi_c.so
|
106
100
|
- lib/2.6/ffi_c.so
|
107
101
|
- lib/2.7/ffi_c.so
|
102
|
+
- lib/3.0/ffi_c.so
|
108
103
|
- lib/ffi.rb
|
104
|
+
- lib/ffi/abstract_memory.rb
|
109
105
|
- lib/ffi/autopointer.rb
|
110
106
|
- lib/ffi/buffer.rb
|
111
107
|
- lib/ffi/callback.rb
|
@@ -118,9 +114,11 @@ files:
|
|
118
114
|
- lib/ffi/managedstruct.rb
|
119
115
|
- lib/ffi/memorypointer.rb
|
120
116
|
- lib/ffi/platform.rb
|
117
|
+
- lib/ffi/platform/aarch64-darwin/types.conf
|
121
118
|
- lib/ffi/platform/aarch64-freebsd/types.conf
|
122
119
|
- lib/ffi/platform/aarch64-freebsd12/types.conf
|
123
120
|
- lib/ffi/platform/aarch64-linux/types.conf
|
121
|
+
- lib/ffi/platform/aarch64-openbsd/types.conf
|
124
122
|
- lib/ffi/platform/arm-freebsd/types.conf
|
125
123
|
- lib/ffi/platform/arm-freebsd12/types.conf
|
126
124
|
- lib/ffi/platform/arm-linux/types.conf
|
@@ -148,6 +146,8 @@ files:
|
|
148
146
|
- lib/ffi/platform/powerpc-linux/types.conf
|
149
147
|
- lib/ffi/platform/powerpc-openbsd/types.conf
|
150
148
|
- lib/ffi/platform/powerpc64-linux/types.conf
|
149
|
+
- lib/ffi/platform/powerpc64le-linux/types.conf
|
150
|
+
- lib/ffi/platform/riscv64-linux/types.conf
|
151
151
|
- lib/ffi/platform/s390-linux/types.conf
|
152
152
|
- lib/ffi/platform/s390x-linux/types.conf
|
153
153
|
- lib/ffi/platform/sparc-linux/types.conf
|
@@ -160,7 +160,9 @@ files:
|
|
160
160
|
- lib/ffi/platform/x86_64-dragonflybsd/types.conf
|
161
161
|
- lib/ffi/platform/x86_64-freebsd/types.conf
|
162
162
|
- lib/ffi/platform/x86_64-freebsd12/types.conf
|
163
|
+
- lib/ffi/platform/x86_64-haiku/types.conf
|
163
164
|
- lib/ffi/platform/x86_64-linux/types.conf
|
165
|
+
- lib/ffi/platform/x86_64-msys/types.conf
|
164
166
|
- lib/ffi/platform/x86_64-netbsd/types.conf
|
165
167
|
- lib/ffi/platform/x86_64-openbsd/types.conf
|
166
168
|
- lib/ffi/platform/x86_64-solaris/types.conf
|
@@ -179,6 +181,7 @@ files:
|
|
179
181
|
- lib/ffi/union.rb
|
180
182
|
- lib/ffi/variadic.rb
|
181
183
|
- lib/ffi/version.rb
|
184
|
+
- rakelib/ffi_gem_helper.rb
|
182
185
|
- samples/getlogin.rb
|
183
186
|
- samples/getpid.rb
|
184
187
|
- samples/gettimeofday.rb
|
@@ -209,14 +212,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
209
212
|
version: '2.3'
|
210
213
|
- - "<"
|
211
214
|
- !ruby/object:Gem::Version
|
212
|
-
version:
|
215
|
+
version: 3.1.dev
|
213
216
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
214
217
|
requirements:
|
215
218
|
- - ">="
|
216
219
|
- !ruby/object:Gem::Version
|
217
220
|
version: '0'
|
218
221
|
requirements: []
|
219
|
-
rubygems_version: 3.
|
222
|
+
rubygems_version: 3.2.3
|
220
223
|
signing_key:
|
221
224
|
specification_version: 4
|
222
225
|
summary: Ruby FFI
|