ffi-clang 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/ffi/clang/clang_version.rb +2 -1
- data/lib/ffi/clang/code_completion.rb +5 -3
- data/lib/ffi/clang/cursor.rb +102 -53
- data/lib/ffi/clang/diagnostic.rb +4 -3
- data/lib/ffi/clang/index.rb +11 -4
- data/lib/ffi/clang/lib/code_completion.rb +9 -8
- data/lib/ffi/clang/lib/cursor.rb +89 -24
- data/lib/ffi/clang/lib/diagnostic.rb +2 -2
- data/lib/ffi/clang/lib/file.rb +3 -1
- data/lib/ffi/clang/lib/index.rb +19 -0
- data/lib/ffi/clang/lib/printing_policy.rb +47 -0
- data/lib/ffi/clang/lib/string.rb +1 -3
- data/lib/ffi/clang/lib/translation_unit.rb +14 -2
- data/lib/ffi/clang/lib/type.rb +80 -3
- data/lib/ffi/clang/lib.rb +11 -10
- data/lib/ffi/clang/printing_policy.rb +36 -0
- data/lib/ffi/clang/source_location.rb +35 -18
- data/lib/ffi/clang/types/array.rb +15 -0
- data/lib/ffi/clang/types/elaborated.rb +26 -0
- data/lib/ffi/clang/types/function.rb +27 -0
- data/lib/ffi/clang/types/pointer.rb +42 -0
- data/lib/ffi/clang/types/record.rb +26 -0
- data/lib/ffi/clang/types/type.rb +98 -0
- data/lib/ffi/clang/types/type_def.rb +15 -0
- data/lib/ffi/clang/types/vector.rb +15 -0
- data/lib/ffi/clang/version.rb +2 -2
- data/lib/ffi/clang.rb +9 -0
- data/license.md +3 -2
- data/readme.md +15 -5
- data.tar.gz.sig +0 -0
- metadata +17 -62
- metadata.gz.sig +0 -0
- data/lib/ffi/clang/type.rb +0 -121
data/readme.md
CHANGED
@@ -39,8 +39,18 @@ Due to issues figuring out which library to use, we require you to manually spec
|
|
39
39
|
|
40
40
|
## Contributing
|
41
41
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
42
|
+
We welcome contributions to this project.
|
43
|
+
|
44
|
+
1. Fork it.
|
45
|
+
2. Create your feature branch (`git checkout -b my-new-feature`).
|
46
|
+
3. Commit your changes (`git commit -am 'Add some feature'`).
|
47
|
+
4. Push to the branch (`git push origin my-new-feature`).
|
48
|
+
5. Create new Pull Request.
|
49
|
+
|
50
|
+
### Developer Certificate of Origin
|
51
|
+
|
52
|
+
This project uses the [Developer Certificate of Origin](https://developercertificate.org/). All contributors to this project must agree to this document to have their contributions accepted.
|
53
|
+
|
54
|
+
### Contributor Covenant
|
55
|
+
|
56
|
+
This project is governed by the [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,18 +1,19 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffi-clang
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
- Masahiro Sano
|
9
9
|
- Carlos Martín Nieto
|
10
|
+
- Charlie Savage
|
10
11
|
- Jari Bakken
|
11
12
|
- Takeshi Watanabe
|
12
13
|
- Garry Marshall
|
13
14
|
- George Pimm
|
15
|
+
- Zete Lui
|
14
16
|
- Greg Hazel
|
15
|
-
- Luikore
|
16
17
|
- Michael Metivier
|
17
18
|
- Dave Wilkinson
|
18
19
|
- Hayden Purdy
|
@@ -54,7 +55,7 @@ cert_chain:
|
|
54
55
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
55
56
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
56
57
|
-----END CERTIFICATE-----
|
57
|
-
date:
|
58
|
+
date: 2024-06-14 00:00:00.000000000 Z
|
58
59
|
dependencies:
|
59
60
|
- !ruby/object:Gem::Dependency
|
60
61
|
name: ffi
|
@@ -70,62 +71,6 @@ dependencies:
|
|
70
71
|
- - ">="
|
71
72
|
- !ruby/object:Gem::Version
|
72
73
|
version: '0'
|
73
|
-
- !ruby/object:Gem::Dependency
|
74
|
-
name: bake-test
|
75
|
-
requirement: !ruby/object:Gem::Requirement
|
76
|
-
requirements:
|
77
|
-
- - ">="
|
78
|
-
- !ruby/object:Gem::Version
|
79
|
-
version: '0'
|
80
|
-
type: :development
|
81
|
-
prerelease: false
|
82
|
-
version_requirements: !ruby/object:Gem::Requirement
|
83
|
-
requirements:
|
84
|
-
- - ">="
|
85
|
-
- !ruby/object:Gem::Version
|
86
|
-
version: '0'
|
87
|
-
- !ruby/object:Gem::Dependency
|
88
|
-
name: bundler
|
89
|
-
requirement: !ruby/object:Gem::Requirement
|
90
|
-
requirements:
|
91
|
-
- - ">="
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version: '1.3'
|
94
|
-
type: :development
|
95
|
-
prerelease: false
|
96
|
-
version_requirements: !ruby/object:Gem::Requirement
|
97
|
-
requirements:
|
98
|
-
- - ">="
|
99
|
-
- !ruby/object:Gem::Version
|
100
|
-
version: '1.3'
|
101
|
-
- !ruby/object:Gem::Dependency
|
102
|
-
name: rspec
|
103
|
-
requirement: !ruby/object:Gem::Requirement
|
104
|
-
requirements:
|
105
|
-
- - ">="
|
106
|
-
- !ruby/object:Gem::Version
|
107
|
-
version: 3.4.0
|
108
|
-
type: :development
|
109
|
-
prerelease: false
|
110
|
-
version_requirements: !ruby/object:Gem::Requirement
|
111
|
-
requirements:
|
112
|
-
- - ">="
|
113
|
-
- !ruby/object:Gem::Version
|
114
|
-
version: 3.4.0
|
115
|
-
- !ruby/object:Gem::Dependency
|
116
|
-
name: rake
|
117
|
-
requirement: !ruby/object:Gem::Requirement
|
118
|
-
requirements:
|
119
|
-
- - ">="
|
120
|
-
- !ruby/object:Gem::Version
|
121
|
-
version: '0'
|
122
|
-
type: :development
|
123
|
-
prerelease: false
|
124
|
-
version_requirements: !ruby/object:Gem::Requirement
|
125
|
-
requirements:
|
126
|
-
- - ">="
|
127
|
-
- !ruby/object:Gem::Version
|
128
|
-
version: '0'
|
129
74
|
description:
|
130
75
|
email:
|
131
76
|
executables: []
|
@@ -153,17 +98,26 @@ files:
|
|
153
98
|
- lib/ffi/clang/lib/file.rb
|
154
99
|
- lib/ffi/clang/lib/inclusions.rb
|
155
100
|
- lib/ffi/clang/lib/index.rb
|
101
|
+
- lib/ffi/clang/lib/printing_policy.rb
|
156
102
|
- lib/ffi/clang/lib/source_location.rb
|
157
103
|
- lib/ffi/clang/lib/source_range.rb
|
158
104
|
- lib/ffi/clang/lib/string.rb
|
159
105
|
- lib/ffi/clang/lib/token.rb
|
160
106
|
- lib/ffi/clang/lib/translation_unit.rb
|
161
107
|
- lib/ffi/clang/lib/type.rb
|
108
|
+
- lib/ffi/clang/printing_policy.rb
|
162
109
|
- lib/ffi/clang/source_location.rb
|
163
110
|
- lib/ffi/clang/source_range.rb
|
164
111
|
- lib/ffi/clang/token.rb
|
165
112
|
- lib/ffi/clang/translation_unit.rb
|
166
|
-
- lib/ffi/clang/
|
113
|
+
- lib/ffi/clang/types/array.rb
|
114
|
+
- lib/ffi/clang/types/elaborated.rb
|
115
|
+
- lib/ffi/clang/types/function.rb
|
116
|
+
- lib/ffi/clang/types/pointer.rb
|
117
|
+
- lib/ffi/clang/types/record.rb
|
118
|
+
- lib/ffi/clang/types/type.rb
|
119
|
+
- lib/ffi/clang/types/type_def.rb
|
120
|
+
- lib/ffi/clang/types/vector.rb
|
167
121
|
- lib/ffi/clang/unsaved_file.rb
|
168
122
|
- lib/ffi/clang/version.rb
|
169
123
|
- license.md
|
@@ -173,6 +127,7 @@ licenses:
|
|
173
127
|
- MIT
|
174
128
|
metadata:
|
175
129
|
funding_uri: https://github.com/sponsors/ioquatix/
|
130
|
+
source_code_uri: https://github.com/ioquatix/ffi-clang.git
|
176
131
|
post_install_message:
|
177
132
|
rdoc_options: []
|
178
133
|
require_paths:
|
@@ -181,14 +136,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
181
136
|
requirements:
|
182
137
|
- - ">="
|
183
138
|
- !ruby/object:Gem::Version
|
184
|
-
version: '
|
139
|
+
version: '3.1'
|
185
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
186
141
|
requirements:
|
187
142
|
- - ">="
|
188
143
|
- !ruby/object:Gem::Version
|
189
144
|
version: '0'
|
190
145
|
requirements: []
|
191
|
-
rubygems_version: 3.
|
146
|
+
rubygems_version: 3.5.9
|
192
147
|
signing_key:
|
193
148
|
specification_version: 4
|
194
149
|
summary: Ruby FFI bindings for libclang C interface.
|
metadata.gz.sig
CHANGED
Binary file
|
data/lib/ffi/clang/type.rb
DELETED
@@ -1,121 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Released under the MIT License.
|
4
|
-
# Copyright, 2013, by Carlos Martín Nieto.
|
5
|
-
# Copyright, 2013-2022, by Samuel Williams.
|
6
|
-
# Copyright, 2013, by Takeshi Watanabe.
|
7
|
-
# Copyright, 2014, by Masahiro Sano.
|
8
|
-
# Copyright, 2014, by Niklas Therning.
|
9
|
-
|
10
|
-
module FFI
|
11
|
-
module Clang
|
12
|
-
class Type
|
13
|
-
attr_reader :type
|
14
|
-
|
15
|
-
def initialize(type, translation_unit)
|
16
|
-
@type = type
|
17
|
-
@translation_unit = translation_unit
|
18
|
-
end
|
19
|
-
|
20
|
-
def kind
|
21
|
-
@type[:kind]
|
22
|
-
end
|
23
|
-
|
24
|
-
def kind_spelling
|
25
|
-
Lib.extract_string Lib.get_type_kind_spelling @type[:kind]
|
26
|
-
end
|
27
|
-
|
28
|
-
def spelling
|
29
|
-
Lib.extract_string Lib.get_type_spelling(@type)
|
30
|
-
end
|
31
|
-
|
32
|
-
def variadic?
|
33
|
-
Lib.is_function_type_variadic(@type) != 0
|
34
|
-
end
|
35
|
-
|
36
|
-
def pod?
|
37
|
-
Lib.is_pod_type(@type) != 0
|
38
|
-
end
|
39
|
-
|
40
|
-
def num_arg_types
|
41
|
-
Lib.get_num_arg_types(@type)
|
42
|
-
end
|
43
|
-
|
44
|
-
def pointee
|
45
|
-
Type.new Lib.get_pointee_type(@type), @translation_unit
|
46
|
-
end
|
47
|
-
|
48
|
-
def canonical
|
49
|
-
Type.new Lib.get_canonical_type(@type), @translation_unit
|
50
|
-
end
|
51
|
-
|
52
|
-
def class_type
|
53
|
-
Type.new Lib.type_get_class_type(@type), @translation_unit
|
54
|
-
end
|
55
|
-
|
56
|
-
def const_qualified?
|
57
|
-
Lib.is_const_qualified_type(@type) != 0
|
58
|
-
end
|
59
|
-
|
60
|
-
def volatile_qualified?
|
61
|
-
Lib.is_volatile_qualified_type(@type) != 0
|
62
|
-
end
|
63
|
-
|
64
|
-
def restrict_qualified?
|
65
|
-
Lib.is_restrict_qualified_type(@type) != 0
|
66
|
-
end
|
67
|
-
|
68
|
-
def arg_type(i)
|
69
|
-
Type.new Lib.get_arg_type(@type, i), @translation_unit
|
70
|
-
end
|
71
|
-
|
72
|
-
def result_type
|
73
|
-
Type.new Lib.get_result_type(@type), @translation_unit
|
74
|
-
end
|
75
|
-
|
76
|
-
def element_type
|
77
|
-
Type.new Lib.get_element_type(@type), @translation_unit
|
78
|
-
end
|
79
|
-
|
80
|
-
def num_elements
|
81
|
-
Lib.get_num_elements(@type)
|
82
|
-
end
|
83
|
-
|
84
|
-
def array_element_type
|
85
|
-
Type.new Lib.get_array_element_type(@type), @translation_unit
|
86
|
-
end
|
87
|
-
|
88
|
-
def array_size
|
89
|
-
Lib.get_array_size(@type)
|
90
|
-
end
|
91
|
-
|
92
|
-
def alignof
|
93
|
-
Lib.type_get_align_of(@type)
|
94
|
-
end
|
95
|
-
|
96
|
-
def sizeof
|
97
|
-
Lib.type_get_size_of(@type)
|
98
|
-
end
|
99
|
-
|
100
|
-
def offsetof(field)
|
101
|
-
Lib.type_get_offset_of(@type, field)
|
102
|
-
end
|
103
|
-
|
104
|
-
def ref_qualifier
|
105
|
-
Lib.type_get_cxx_ref_qualifier(@type)
|
106
|
-
end
|
107
|
-
|
108
|
-
def calling_conv
|
109
|
-
Lib.get_fuction_type_calling_conv(@type)
|
110
|
-
end
|
111
|
-
|
112
|
-
def declaration
|
113
|
-
Cursor.new Lib.get_type_declaration(@type), @translation_unit
|
114
|
-
end
|
115
|
-
|
116
|
-
def ==(other)
|
117
|
-
Lib.equal_types(@type, other.type) != 0
|
118
|
-
end
|
119
|
-
end
|
120
|
-
end
|
121
|
-
end
|