Skip to content

Commit ffc662a

Browse files
committed
Extract source: Support newer libclang versions
1 parent 4a74b27 commit ffc662a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/extract_source.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ def analyze_file(file)
279279
end_offset += 1 if cursor.kind == :cursor_variable # The ";" isn't counted correctly by clang
280280

281281
if cursor.kind == :cursor_variable && (cursor.linkage == :external || cursor.linkage == :internal) &&
282-
!cursor.type.const_qualified? && !cursor.type.array_element_type.const_qualified? &&
283-
cursor.type.pointee.kind != :type_function_proto
282+
!cursor.type.const_qualified? && !(cursor.type.is_a?(FFI::Clang::Types::Array) && cursor.type.element_type.const_qualified?) &&
283+
!(cursor.type.is_a?(FFI::Clang::Types::Pointer) && cursor.type.pointee.kind == :type_function_proto)
284284
analysis.external_variables << cursor.spelling
285285
end
286286

0 commit comments

Comments
 (0)