Use new StringDictionary name.

This commit is contained in:
Brent Simmons 2024-09-23 21:13:55 -07:00
parent a39130ff77
commit 1f8b296a9c
3 changed files with 8 additions and 7 deletions

View File

@ -46,6 +46,7 @@ let package = Package(
.target(
name: "HTMLParser",
dependencies: [
"FoundationExtras",
"SAX"
],
swiftSettings: [
@ -63,7 +64,9 @@ let package = Package(
]),
.target(
name: "SAX",
dependencies: [],
dependencies: [
"FoundationExtras"
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency")
]),

View File

@ -6,6 +6,7 @@
//
import Foundation
import FoundationExtras
import libxml2
public protocol SAXHTMLParserDelegate: AnyObject {
@ -94,9 +95,7 @@ public final class SAXHTMLParser {
characters.count = 0
}
public typealias HTMLAttributesDictionary = [String: String]
public func attributesDictionary(_ attributes: UnsafePointer<XMLPointer?>?) -> HTMLAttributesDictionary? {
public func attributesDictionary(_ attributes: UnsafePointer<XMLPointer?>?) -> StringDictionary? {
guard let attributes else {
return nil

View File

@ -6,6 +6,7 @@
//
import Foundation
import FoundationExtras
import libxml2
public typealias XMLPointer = UnsafePointer<xmlChar>
@ -91,9 +92,7 @@ public final class SAXParser {
characters.count = 0
}
public typealias XMLAttributesDictionary = [String: String]
public func attributesDictionary(_ attributes: UnsafePointer<XMLPointer?>?, attributeCount: Int) -> XMLAttributesDictionary? {
public func attributesDictionary(_ attributes: UnsafePointer<XMLPointer?>?, attributeCount: Int) -> StringDictionary? {
guard attributeCount > 0, let attributes else {
return nil