#include <objc/hashtable2.h>

objc/hashtable2.h

includes: objc/objc.h, stdint.h, TargetConditionals.h
21 functions · 5 macros · 4 variables · 3 structs · 3 typedefs

macroOBJC_HASH_AVAILABILITY

#define OBJC_HASH_AVAILABILITY OBJC_OSX_DEPRECATED_OTHERS_UNAVAILABLE(10.0, 10.1, "NXHashTable is deprecated")

macroNXHashTable_ptrauth_prototype

#define NXHashTable_ptrauth_prototype 

macroNXHashTable_ptrauth_hash

#define NXHashTable_ptrauth_hash 

macroNXHashTable_ptrauth_isEqual

#define NXHashTable_ptrauth_isEqual 

macroNXHashTable_ptrauth_free

#define NXHashTable_ptrauth_free 

structNXHashTablePrototype

size 32, align 8
uintptr_t (*)(const void * _Nullable, const void * _Nullable)hash
int (*)(const void * _Nullable, const void * _Nullable, const void * _Nullable)isEqual
void (*)(const void * _Nullable, void * _Nullable)free
intstylereserved for future expansion; currently 0

typedefNXHashTablePrototype

typedef struct NXHashTablePrototype NXHashTablePrototype;

structNXHashTable

size 32, align 8
const NXHashTablePrototype *prototype
unsigned intcount
unsigned intnbBuckets
void *buckets
const void *info

typedefNXHashTable

typedef struct NXHashTable NXHashTable;

functionNXCreateHashTableFromZone

OBJC_HASH_AVAILABILITY
OBJC_EXPORT NXHashTable * _Nonnull NXCreateHashTableFromZone(
	NXHashTablePrototype prototype,
	unsigned capacity,
	const void * _Nullable info,
	void * _Nullable zone __unused
)
deprecated

functionNXCreateHashTable

OBJC_HASH_AVAILABILITY
OBJC_EXPORT NXHashTable * _Nonnull NXCreateHashTable(
	NXHashTablePrototype prototype,
	unsigned capacity,
	const void * _Nullable info
)
deprecated

functionNXFreeHashTable

OBJC_HASH_AVAILABILITY
OBJC_EXPORT void NXFreeHashTable(NXHashTable * _Nonnull table)
deprecated

functionNXEmptyHashTable

OBJC_HASH_AVAILABILITY
OBJC_EXPORT void NXEmptyHashTable(NXHashTable * _Nonnull table)
deprecated

functionNXResetHashTable

OBJC_HASH_AVAILABILITY
OBJC_EXPORT void NXResetHashTable(NXHashTable * _Nonnull table)
deprecated

functionNXCompareHashTables

OBJC_HASH_AVAILABILITY
OBJC_EXPORT BOOL NXCompareHashTables(
	NXHashTable * _Nonnull table1,
	NXHashTable * _Nonnull table2
)
deprecated

functionNXCopyHashTable

OBJC_HASH_AVAILABILITY
OBJC_EXPORT NXHashTable * _Nonnull NXCopyHashTable(NXHashTable * _Nonnull table)
deprecated

functionNXCountHashTable

OBJC_HASH_AVAILABILITY
OBJC_EXPORT unsigned NXCountHashTable(NXHashTable * _Nonnull table)
deprecated

functionNXHashMember

OBJC_HASH_AVAILABILITY
OBJC_EXPORT int NXHashMember(NXHashTable * _Nonnull table, const void * _Nullable data)
deprecated

functionNXHashGet

OBJC_HASH_AVAILABILITY
OBJC_EXPORT void * _Nullable NXHashGet(
	NXHashTable * _Nonnull table,
	const void * _Nullable data
)
deprecated

functionNXHashInsert

OBJC_HASH_AVAILABILITY
OBJC_EXPORT void * _Nullable NXHashInsert(
	NXHashTable * _Nonnull table,
	const void * _Nullable data
)
deprecated

functionNXHashInsertIfAbsent

OBJC_HASH_AVAILABILITY
OBJC_EXPORT void * _Nullable NXHashInsertIfAbsent(
	NXHashTable * _Nonnull table,
	const void * _Nullable data
)
deprecated

functionNXHashRemove

OBJC_HASH_AVAILABILITY
OBJC_EXPORT void * _Nullable NXHashRemove(
	NXHashTable * _Nonnull table,
	const void * _Nullable data
)
deprecated

structNXHashState

size 8, align 4
inti
intj

typedefNXHashState

typedef struct {int i; int j;} NXHashState

functionNXInitHashState

OBJC_HASH_AVAILABILITY
OBJC_EXPORT NXHashState NXInitHashState(NXHashTable * _Nonnull table)
deprecated

functionNXNextHashState

OBJC_HASH_AVAILABILITY
OBJC_EXPORT int NXNextHashState(
	NXHashTable * _Nonnull table,
	NXHashState * _Nonnull state,
	void * _Nullable * _Nonnull data
)
deprecated

functionNXPtrHash

OBJC_HASH_AVAILABILITY
OBJC_EXPORT uintptr_t NXPtrHash(const void * _Nullable info, const void * _Nullable data)
deprecated

functionNXStrHash

OBJC_HASH_AVAILABILITY
OBJC_EXPORT uintptr_t NXStrHash(const void * _Nullable info, const void * _Nullable data)
deprecated

functionNXPtrIsEqual

OBJC_HASH_AVAILABILITY
OBJC_EXPORT int NXPtrIsEqual(
	const void * _Nullable info,
	const void * _Nullable data1,
	const void * _Nullable data2
)
deprecated

functionNXStrIsEqual

OBJC_HASH_AVAILABILITY
OBJC_EXPORT int NXStrIsEqual(
	const void * _Nullable info,
	const void * _Nullable data1,
	const void * _Nullable data2
)
deprecated

functionNXNoEffectFree

OBJC_HASH_AVAILABILITY
OBJC_EXPORT void NXNoEffectFree(const void * _Nullable info, void * _Nullable data)
deprecated

functionNXReallyFree

OBJC_HASH_AVAILABILITY
OBJC_EXPORT void NXReallyFree(const void * _Nullable info, void * _Nullable data)
deprecated

variableNXPtrPrototype

The two following prototypes are useful for manipulating set of pointers or set of strings; For them free is defined as NXNoEffectFree
OBJC_EXPORT const NXHashTablePrototype NXPtrPrototype

variableNXStrPrototype

OBJC_EXPORT const NXHashTablePrototype NXStrPrototype

variableNXPtrStructKeyPrototype

following prototypes help describe mappings where the key is the first element of a struct and is either a pointer or a string. For example NXStrStructKeyPrototype can be used to hash pointers to Example, where Example is: typedef struct { char *key; int data1; ... } Example For the following prototypes, free is defined as NXReallyFree.
OBJC_EXPORT const NXHashTablePrototype NXPtrStructKeyPrototype

variableNXStrStructKeyPrototype

OBJC_EXPORT const NXHashTablePrototype NXStrStructKeyPrototype