8049964bd1
- New DECLS - Begin wrapping __cdecl sqlite3 into __stdcall functions (sqlite3 doesn't understand __stdcall) - Use __stdcall and /EXPORT instead of __cdecl to not corrupt the stack. - Implement two versions of the Indexer, V1 for really fast access and V2 for memory saving. Signed-off-by: Michael Fabian Dirks <michael.dirks@realitybends.de>
19 lines
421 B
C++
19 lines
421 B
C++
#pragma once
|
|
#include <cstdlib>
|
|
#include <list>
|
|
#include "dllmain.h"
|
|
|
|
// 67108864 = 2 ^ 32 / 64
|
|
#define INDEXER_INDEXES 67108864
|
|
|
|
/** Indexer structure helps with getting unique, unused Indexes (Ids).
|
|
* Doing this natively would be too slow, so I'm using a DLL for this.
|
|
*/
|
|
struct IndexerV1 {
|
|
uint64_t indexes[67108864];
|
|
uint32_t lastAssignedIndex;
|
|
|
|
unsigned int GetFreeIndex();
|
|
void MarkFreeIndex(int index);
|
|
};
|