diff --git a/Sources/WebAPIKit/Generated.swift b/Sources/WebAPIKit/Generated.swift index 0ec0d64c..0363d116 100644 --- a/Sources/WebAPIKit/Generated.swift +++ b/Sources/WebAPIKit/Generated.swift @@ -21238,7 +21238,6 @@ public typealias GLbyte = Int8 public typealias GLshort = Int16 public typealias GLint = Int32 public typealias GLsizei = Int32 -public typealias GLintptr = Int64 public typealias GLsizeiptr = Int64 public typealias GLubyte = UInt8 public typealias GLushort = UInt16 diff --git a/Sources/WebAPIKit/Support.swift b/Sources/WebAPIKit/Support.swift index df39886f..a4c1aa5e 100644 --- a/Sources/WebAPIKit/Support.swift +++ b/Sources/WebAPIKit/Support.swift @@ -1,5 +1,5 @@ -import JavaScriptKit @_exported import ECMAScript +import JavaScriptKit /* TODO: fix this */ public typealias __UNSUPPORTED_BIGINT__ = JSValue @@ -22,3 +22,4 @@ public typealias HTMLOrSVGImageElement = HTMLImageElement public typealias HTMLOrSVGScriptElement = HTMLScriptElement public typealias BodyInit = XMLHttpRequestBodyInit public typealias CustomElementConstructor = JSFunction +public typealias GLintptr = Int32 diff --git a/Sources/WebIDLToSwift/MergeDeclarations.swift b/Sources/WebIDLToSwift/MergeDeclarations.swift index 991c11ef..7902f6ed 100644 --- a/Sources/WebIDLToSwift/MergeDeclarations.swift +++ b/Sources/WebIDLToSwift/MergeDeclarations.swift @@ -7,6 +7,9 @@ enum DeclarationMerger { "CustomElementConstructor", "ArrayBufferView", "RotationMatrixType", + // Mapped to `Int32` manually. This can't be represented as `Int64` due to `BigInt` representation on JS side, + // but as a pointer it can't be represented as floating point number either. + "GLintptr", ] static let validExposures: Set = ["Window"] diff --git a/Sources/WebIDLToSwift/WebIDL+SwiftRepresentation.swift b/Sources/WebIDLToSwift/WebIDL+SwiftRepresentation.swift index 0a5c4005..ed3a8090 100644 --- a/Sources/WebIDLToSwift/WebIDL+SwiftRepresentation.swift +++ b/Sources/WebIDLToSwift/WebIDL+SwiftRepresentation.swift @@ -541,6 +541,7 @@ extension IDLType: SwiftRepresentable { "byte": "Int8", "short": "Int16", "long": "Int32", + // FIXME: this maps to BigInt when bridged to JS, which most probably leads to issues. "long long": "Int64", "Function": "JSFunction", "bigint": "__UNSUPPORTED_BIGINT__",