Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions lib/Macros/Sources/SwiftMacros/SwiftifyImportMacro.swift
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,11 @@ func isRawPointerType(text: String) -> Bool {

// Remove std. or std.__1. prefix
func getUnqualifiedStdName(_ type: String) -> String? {
if type.hasPrefix("std.") {
var ty = type.dropFirst(4)
if ty.hasPrefix("__1.") {
ty = ty.dropFirst(4)
let prefixes = ["std.__1.", "std.__ndk1.", "std."]
for prefix in prefixes {
if type.hasPrefix(prefix) {
return String(type.dropFirst(prefix.count))
}
return String(ty)
}
return nil
}
Expand Down