Skip to content

Update UniqueID #110

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

Merged
merged 1 commit into from
Mar 23, 2025
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
8 changes: 4 additions & 4 deletions Sources/OpenGraph_SPI/Data/OGUniqueID.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
//
// OGUniqueID.c
// OpenGraph_SPI
//
//
// Created by Kyle on 2023/10/9.
//
// Audited for iOS 18.0
// Status: Complete

#include "OGUniqueID.h"
#include <stdatomic.h>

OGUniqueID OGMakeUniqueID(void) {
// Initial value is 1
static atomic_llong counter = 1;
static atomic_long counter = 1;
return counter++;
}
8 changes: 4 additions & 4 deletions Sources/OpenGraph_SPI/Data/OGUniqueID.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
//
// OGMakeUniqueID.h
//
//
// Created by Kyle on 2023/10/9.
// OpenGraph_SPI
//
// Audited for iOS 18.0
// Status: Complete

#ifndef OGMakeUniqueID_h
#define OGMakeUniqueID_h

#include "OGBase.h"
typedef long long OGUniqueID;
typedef long OGUniqueID;

OG_EXTERN_C_BEGIN
OG_EXPORT
Expand Down
4 changes: 1 addition & 3 deletions Tests/OpenGraphCompatibilityTests/Data/UniqueIDTests.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//
// UniqueIDTests.swift
//
//
//
// OpenGraphCompatibilityTests

import Testing

Expand Down