Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for Xcode 16 beta 6 #16

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
persist-credentials: false
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.0-beta'
Expand All @@ -29,6 +30,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
persist-credentials: false
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.0-beta'
Expand All @@ -43,6 +45,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
persist-credentials: false
- name: Set up SDK
run: cd sdk && sudo make install
- name: Run tests
Expand Down
2 changes: 1 addition & 1 deletion Sources/LibGenerate/Callbacks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ extension MetadataDB.Struct {
let swiftType = name.swiftType
return """
/// Registration for Steamworks `\(name)` callback
func on\(swiftType)(_ client: @Sendable @escaping (\(swiftType)) -> Void) {
func on\(swiftType)(_ client: @Sendable @escaping (sending \(swiftType)) -> Void) {
callbacks.add(callbackID: CallbackID(\(callbackID!)), rawClient: SteamBaseAPI.makeRaw(client))
}
"""
Expand Down
2 changes: 1 addition & 1 deletion Sources/LibGenerate/Interfaces.swift
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ struct SteamMethod {

case .callReturn(let type):
precondition(!db.isVar)
let done = "completion: @Sendable @escaping (\(type)?) -> Void"
let done = "completion: @Sendable @escaping (sending \(type)?) -> Void"
return "public func \(db.funcName)(\(params.functionParams.commaAppend(done))) {"
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Steamworks/Generated/SteamApps.swift
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public struct SteamApps: Sendable {
}

/// Steamworks `ISteamApps::GetFileDetails()`, callback
public func getFileDetails(fileName: String, completion: @Sendable @escaping (FileDetailsResult?) -> Void) {
public func getFileDetails(fileName: String, completion: @Sendable @escaping (sending FileDetailsResult?) -> Void) {
let rc = SteamAPI_ISteamApps_GetFileDetails(interface, fileName)
SteamBaseAPI.CallResults.shared.add(callID: rc, rawClient: SteamBaseAPI.makeRaw(completion))
}
Expand Down
286 changes: 143 additions & 143 deletions Sources/Steamworks/Generated/SteamBaseAPI+Callbacks.swift

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions Sources/Steamworks/Generated/SteamFriends.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public struct SteamFriends: Sendable {
}

/// Steamworks `ISteamFriends::DownloadClanActivityCounts()`, callback
public func downloadClanActivityCounts(clans: [SteamID], completion: @Sendable @escaping (DownloadClanActivityCountsResult?) -> Void) {
public func downloadClanActivityCounts(clans: [SteamID], completion: @Sendable @escaping (sending DownloadClanActivityCountsResult?) -> Void) {
var tmpClans = clans.map { CSteamID($0) }
let rc = SteamAPI_ISteamFriends_DownloadClanActivityCounts(interface, &tmpClans, CInt(clans.count))
SteamBaseAPI.CallResults.shared.add(callID: rc, rawClient: SteamBaseAPI.makeRaw(completion))
Expand All @@ -84,7 +84,7 @@ public struct SteamFriends: Sendable {
}

/// Steamworks `ISteamFriends::EnumerateFollowingList()`, callback
public func enumerateFollowingList(startIndex: Int, completion: @Sendable @escaping (FriendsEnumerateFollowingList?) -> Void) {
public func enumerateFollowingList(startIndex: Int, completion: @Sendable @escaping (sending FriendsEnumerateFollowingList?) -> Void) {
let rc = SteamAPI_ISteamFriends_EnumerateFollowingList(interface, uint32(startIndex))
SteamBaseAPI.CallResults.shared.add(callID: rc, rawClient: SteamBaseAPI.makeRaw(completion))
}
Expand Down Expand Up @@ -172,7 +172,7 @@ public struct SteamFriends: Sendable {
}

/// Steamworks `ISteamFriends::GetFollowerCount()`, callback
public func getFollowerCount(steamID: SteamID, completion: @Sendable @escaping (FriendsGetFollowerCount?) -> Void) {
public func getFollowerCount(steamID: SteamID, completion: @Sendable @escaping (sending FriendsGetFollowerCount?) -> Void) {
let rc = SteamAPI_ISteamFriends_GetFollowerCount(interface, CUnsignedLongLong(steamID))
SteamBaseAPI.CallResults.shared.add(callID: rc, rawClient: SteamBaseAPI.makeRaw(completion))
}
Expand Down Expand Up @@ -383,7 +383,7 @@ public struct SteamFriends: Sendable {
}

/// Steamworks `ISteamFriends::IsFollowing()`, callback
public func isFollowing(steamID: SteamID, completion: @Sendable @escaping (FriendsIsFollowing?) -> Void) {
public func isFollowing(steamID: SteamID, completion: @Sendable @escaping (sending FriendsIsFollowing?) -> Void) {
let rc = SteamAPI_ISteamFriends_IsFollowing(interface, CUnsignedLongLong(steamID))
SteamBaseAPI.CallResults.shared.add(callID: rc, rawClient: SteamBaseAPI.makeRaw(completion))
}
Expand All @@ -401,7 +401,7 @@ public struct SteamFriends: Sendable {
}

/// Steamworks `ISteamFriends::JoinClanChatRoom()`, callback
public func joinClanChatRoom(clan: SteamID, completion: @Sendable @escaping (JoinClanChatRoomCompletionResult?) -> Void) {
public func joinClanChatRoom(clan: SteamID, completion: @Sendable @escaping (sending JoinClanChatRoomCompletionResult?) -> Void) {
let rc = SteamAPI_ISteamFriends_JoinClanChatRoom(interface, CUnsignedLongLong(clan))
SteamBaseAPI.CallResults.shared.add(callID: rc, rawClient: SteamBaseAPI.makeRaw(completion))
}
Expand Down Expand Up @@ -434,7 +434,7 @@ public struct SteamFriends: Sendable {
}

/// Steamworks `ISteamFriends::RequestClanOfficerList()`, callback
public func requestClanOfficerList(clan: SteamID, completion: @Sendable @escaping (ClanOfficerListResponse?) -> Void) {
public func requestClanOfficerList(clan: SteamID, completion: @Sendable @escaping (sending ClanOfficerListResponse?) -> Void) {
let rc = SteamAPI_ISteamFriends_RequestClanOfficerList(interface, CUnsignedLongLong(clan))
SteamBaseAPI.CallResults.shared.add(callID: rc, rawClient: SteamBaseAPI.makeRaw(completion))
}
Expand All @@ -447,7 +447,7 @@ public struct SteamFriends: Sendable {
}

/// Steamworks `ISteamFriends::RequestEquippedProfileItems()`, callback
public func requestEquippedProfileItems(steamID: SteamID, completion: @Sendable @escaping (EquippedProfileItems?) -> Void) {
public func requestEquippedProfileItems(steamID: SteamID, completion: @Sendable @escaping (sending EquippedProfileItems?) -> Void) {
let rc = SteamAPI_ISteamFriends_RequestEquippedProfileItems(interface, CUnsignedLongLong(steamID))
SteamBaseAPI.CallResults.shared.add(callID: rc, rawClient: SteamBaseAPI.makeRaw(completion))
}
Expand Down Expand Up @@ -486,7 +486,7 @@ public struct SteamFriends: Sendable {
}

/// Steamworks `ISteamFriends::SetPersonaName()`, callback
public func setPersonaName(personaName: String, completion: @Sendable @escaping (SetPersonaNameResponse?) -> Void) {
public func setPersonaName(personaName: String, completion: @Sendable @escaping (sending SetPersonaNameResponse?) -> Void) {
let rc = SteamAPI_ISteamFriends_SetPersonaName(interface, personaName)
SteamBaseAPI.CallResults.shared.add(callID: rc, rawClient: SteamBaseAPI.makeRaw(completion))
}
Expand Down
6 changes: 3 additions & 3 deletions Sources/Steamworks/Generated/SteamGameServer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public struct SteamGameServer: Sendable {
}

/// Steamworks `ISteamGameServer::AssociateWithClan()`, callback
public func associateWithClan(clan: SteamID, completion: @Sendable @escaping (AssociateWithClanResult?) -> Void) {
public func associateWithClan(clan: SteamID, completion: @Sendable @escaping (sending AssociateWithClanResult?) -> Void) {
let rc = SteamAPI_ISteamGameServer_AssociateWithClan(interface, CUnsignedLongLong(clan))
SteamBaseAPI.CallResults.shared.add(callID: rc, rawClient: SteamBaseAPI.makeRaw(completion))
}
Expand Down Expand Up @@ -64,7 +64,7 @@ public struct SteamGameServer: Sendable {
}

/// Steamworks `ISteamGameServer::ComputeNewPlayerCompatibility()`, callback
public func computeNewPlayerCompatibility(newPlayer: SteamID, completion: @Sendable @escaping (ComputeNewPlayerCompatibilityResult?) -> Void) {
public func computeNewPlayerCompatibility(newPlayer: SteamID, completion: @Sendable @escaping (sending ComputeNewPlayerCompatibilityResult?) -> Void) {
let rc = SteamAPI_ISteamGameServer_ComputeNewPlayerCompatibility(interface, CUnsignedLongLong(newPlayer))
SteamBaseAPI.CallResults.shared.add(callID: rc, rawClient: SteamBaseAPI.makeRaw(completion))
}
Expand Down Expand Up @@ -117,7 +117,7 @@ public struct SteamGameServer: Sendable {
}

/// Steamworks `ISteamGameServer::GetServerReputation()`, callback
public func getServerReputation(completion: @Sendable @escaping (GSReputation?) -> Void) {
public func getServerReputation(completion: @Sendable @escaping (sending GSReputation?) -> Void) {
let rc = SteamAPI_ISteamGameServer_GetServerReputation(interface)
SteamBaseAPI.CallResults.shared.add(callID: rc, rawClient: SteamBaseAPI.makeRaw(completion))
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/Steamworks/Generated/SteamGameServerStats.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public struct SteamGameServerStats: Sendable {
}

/// Steamworks `ISteamGameServerStats::RequestUserStats()`, callback
public func requestUserStats(user: SteamID, completion: @Sendable @escaping (GSStatsReceived?) -> Void) {
public func requestUserStats(user: SteamID, completion: @Sendable @escaping (sending GSStatsReceived?) -> Void) {
let rc = SteamAPI_ISteamGameServerStats_RequestUserStats(interface, CUnsignedLongLong(user))
SteamBaseAPI.CallResults.shared.add(callID: rc, rawClient: SteamBaseAPI.makeRaw(completion))
}
Expand Down Expand Up @@ -74,7 +74,7 @@ public struct SteamGameServerStats: Sendable {
}

/// Steamworks `ISteamGameServerStats::StoreUserStats()`, callback
public func storeUserStats(user: SteamID, completion: @Sendable @escaping (GSStatsStored?) -> Void) {
public func storeUserStats(user: SteamID, completion: @Sendable @escaping (sending GSStatsStored?) -> Void) {
let rc = SteamAPI_ISteamGameServerStats_StoreUserStats(interface, CUnsignedLongLong(user))
SteamBaseAPI.CallResults.shared.add(callID: rc, rawClient: SteamBaseAPI.makeRaw(completion))
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Steamworks/Generated/SteamHTMLSurface.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public struct SteamHTMLSurface: Sendable {
}

/// Steamworks `ISteamHTMLSurface::CreateBrowser()`, callback
public func createBrowser(userAgent: String?, userCSS: String?, completion: @Sendable @escaping (HTMLBrowserReady?) -> Void) {
public func createBrowser(userAgent: String?, userCSS: String?, completion: @Sendable @escaping (sending HTMLBrowserReady?) -> Void) {
let rc = SteamAPI_ISteamHTMLSurface_CreateBrowser(interface, userAgent, userCSS)
SteamBaseAPI.CallResults.shared.add(callID: rc, rawClient: SteamBaseAPI.makeRaw(completion))
}
Expand Down
6 changes: 3 additions & 3 deletions Sources/Steamworks/Generated/SteamInventory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public struct SteamInventory: Sendable {
}

/// Steamworks `ISteamInventory::RequestEligiblePromoItemDefinitionsIDs()`, callback
public func requestEligiblePromoItemDefinitionsIDs(steamID: SteamID, completion: @Sendable @escaping (SteamInventoryEligiblePromoItemDefIDs?) -> Void) {
public func requestEligiblePromoItemDefinitionsIDs(steamID: SteamID, completion: @Sendable @escaping (sending SteamInventoryEligiblePromoItemDefIDs?) -> Void) {
let rc = SteamAPI_ISteamInventory_RequestEligiblePromoItemDefinitionsIDs(interface, CUnsignedLongLong(steamID))
SteamBaseAPI.CallResults.shared.add(callID: rc, rawClient: SteamBaseAPI.makeRaw(completion))
}
Expand All @@ -230,7 +230,7 @@ public struct SteamInventory: Sendable {
}

/// Steamworks `ISteamInventory::RequestPrices()`, callback
public func requestPrices(completion: @Sendable @escaping (SteamInventoryRequestPricesResult?) -> Void) {
public func requestPrices(completion: @Sendable @escaping (sending SteamInventoryRequestPricesResult?) -> Void) {
let rc = SteamAPI_ISteamInventory_RequestPrices(interface)
SteamBaseAPI.CallResults.shared.add(callID: rc, rawClient: SteamBaseAPI.makeRaw(completion))
}
Expand Down Expand Up @@ -278,7 +278,7 @@ public struct SteamInventory: Sendable {
}

/// Steamworks `ISteamInventory::StartPurchase()`, callback
public func startPurchase(arrayItemDefs: [SteamItemDef], arrayQuantity: [Int], completion: @Sendable @escaping (SteamInventoryStartPurchaseResult?) -> Void) {
public func startPurchase(arrayItemDefs: [SteamItemDef], arrayQuantity: [Int], completion: @Sendable @escaping (sending SteamInventoryStartPurchaseResult?) -> Void) {
var tmpArrayItemDefs = arrayItemDefs.map { SteamItemDef_t($0) }
var tmpArrayQuantity = arrayQuantity.map { uint32($0) }
let rc = SteamAPI_ISteamInventory_StartPurchase(interface, &tmpArrayItemDefs, &tmpArrayQuantity, uint32(arrayQuantity.count))
Expand Down
6 changes: 3 additions & 3 deletions Sources/Steamworks/Generated/SteamMatchmaking.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public struct SteamMatchmaking: Sendable {
}

/// Steamworks `ISteamMatchmaking::CreateLobby()`, callback
public func createLobby(lobbyType: LobbyType, maxMembers: Int, completion: @Sendable @escaping (LobbyCreated?) -> Void) {
public func createLobby(lobbyType: LobbyType, maxMembers: Int, completion: @Sendable @escaping (sending LobbyCreated?) -> Void) {
let rc = SteamAPI_ISteamMatchmaking_CreateLobby(interface, ELobbyType(lobbyType), CInt(maxMembers))
SteamBaseAPI.CallResults.shared.add(callID: rc, rawClient: SteamBaseAPI.makeRaw(completion))
}
Expand Down Expand Up @@ -179,7 +179,7 @@ public struct SteamMatchmaking: Sendable {
}

/// Steamworks `ISteamMatchmaking::JoinLobby()`, callback
public func joinLobby(lobby: SteamID, completion: @Sendable @escaping (LobbyEnter?) -> Void) {
public func joinLobby(lobby: SteamID, completion: @Sendable @escaping (sending LobbyEnter?) -> Void) {
let rc = SteamAPI_ISteamMatchmaking_JoinLobby(interface, CUnsignedLongLong(lobby))
SteamBaseAPI.CallResults.shared.add(callID: rc, rawClient: SteamBaseAPI.makeRaw(completion))
}
Expand Down Expand Up @@ -209,7 +209,7 @@ public struct SteamMatchmaking: Sendable {
}

/// Steamworks `ISteamMatchmaking::RequestLobbyList()`, callback
public func requestLobbyList(completion: @Sendable @escaping (LobbyMatchList?) -> Void) {
public func requestLobbyList(completion: @Sendable @escaping (sending LobbyMatchList?) -> Void) {
let rc = SteamAPI_ISteamMatchmaking_RequestLobbyList(interface)
SteamBaseAPI.CallResults.shared.add(callID: rc, rawClient: SteamBaseAPI.makeRaw(completion))
}
Expand Down
6 changes: 3 additions & 3 deletions Sources/Steamworks/Generated/SteamParties.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public struct SteamParties: Sendable {
}

/// Steamworks `ISteamParties::ChangeNumOpenSlots()`, callback
public func changeNumOpenSlots(beacon: PartyBeaconID, openSlots: Int, completion: @Sendable @escaping (ChangeNumOpenSlotsCallback?) -> Void) {
public func changeNumOpenSlots(beacon: PartyBeaconID, openSlots: Int, completion: @Sendable @escaping (sending ChangeNumOpenSlotsCallback?) -> Void) {
let rc = SteamAPI_ISteamParties_ChangeNumOpenSlots(interface, PartyBeaconID_t(beacon), uint32(openSlots))
SteamBaseAPI.CallResults.shared.add(callID: rc, rawClient: SteamBaseAPI.makeRaw(completion))
}
Expand All @@ -38,7 +38,7 @@ public struct SteamParties: Sendable {
}

/// Steamworks `ISteamParties::CreateBeacon()`, callback
public func createBeacon(openSlots: Int, beaconLocation: SteamPartyBeaconLocation, connectString: String, metadata: String, completion: @Sendable @escaping (CreateBeaconCallback?) -> Void) {
public func createBeacon(openSlots: Int, beaconLocation: SteamPartyBeaconLocation, connectString: String, metadata: String, completion: @Sendable @escaping (sending CreateBeaconCallback?) -> Void) {
let rc = CSteamAPI_ISteamParties_CreateBeacon(interface, uint32(openSlots), SteamPartyBeaconLocation_t(beaconLocation), connectString, metadata)
SteamBaseAPI.CallResults.shared.add(callID: rc, rawClient: SteamBaseAPI.makeRaw(completion))
}
Expand Down Expand Up @@ -101,7 +101,7 @@ public struct SteamParties: Sendable {
}

/// Steamworks `ISteamParties::JoinParty()`, callback
public func joinParty(beaconID: PartyBeaconID, completion: @Sendable @escaping (JoinPartyCallback?) -> Void) {
public func joinParty(beaconID: PartyBeaconID, completion: @Sendable @escaping (sending JoinPartyCallback?) -> Void) {
let rc = SteamAPI_ISteamParties_JoinParty(interface, PartyBeaconID_t(beaconID))
SteamBaseAPI.CallResults.shared.add(callID: rc, rawClient: SteamBaseAPI.makeRaw(completion))
}
Expand Down
Loading
Loading