Skip to content

Commit 1491950

Browse files
committed
remove unsigned integer support for now
1 parent c9ee545 commit 1491950

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

Sources/JExtractSwiftLib/JNI/JNISwift2JavaGenerator.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -234,20 +234,20 @@ extension SwiftType {
234234
}
235235
}
236236

237-
extension KnownStandardLibraryType {
237+
extension SwiftStandardLibraryTypeKind {
238238
var javaType: JavaType? {
239239
switch self {
240240
case .bool: .boolean
241-
case .int, .uint: .long // TODO: Handle 32-bit or 64-bit
242-
case .int8, .uint8: .byte
241+
case .int: .long // TODO: Handle 32-bit or 64-bit
242+
case .int8: .byte
243243
case .uint16: .char
244244
case .int16: .short
245-
case .int32, .uint32: .int
246-
case .int64, .uint64: .long
245+
case .int32: .int
246+
case .int64: .long
247247
case .float: .float
248248
case .double: .double
249249
case .void: .void
250-
case .unsafeRawPointer, .unsafeMutableRawPointer, .unsafePointer, .unsafeMutablePointer, .unsafeBufferPointer, .unsafeMutableBufferPointer, .string: nil
250+
case .uint, .uint8, .uint32, .uint64, .unsafeRawPointer, .unsafeMutableRawPointer, .unsafePointer, .unsafeMutablePointer, .unsafeBufferPointer, .unsafeMutableBufferPointer, .string: nil
251251
}
252252
}
253253
}

Tests/JExtractSwiftTests/JNI/JNIModuleTests.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2025 Apple Inc. and the Swift.org project authors
6+
// Licensed under Apache License v2.0
7+
//
8+
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of Swift.org project authors
10+
//
11+
// SPDX-License-Identifier: Apache-2.0
12+
//
13+
//===----------------------------------------------------------------------===//
14+
115
import JExtractSwiftLib
216
import Testing
317

0 commit comments

Comments
 (0)