mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-08 03:46:02 +03:00
26 lines
726 B
C++
26 lines
726 B
C++
#ifndef CONTEXT_H
|
|
#define CONTEXT_H
|
|
|
|
#include <cstddef> //size_t
|
|
|
|
// must be synchronized with D source
|
|
typedef void (*InterruptPointHandlerT)(void*, const char* action, const char* object);
|
|
typedef void (*FatalHandlerT)(void*, const char* reason);
|
|
typedef void (*DumpHandlerT)(void*, const char* str, std::size_t len);
|
|
|
|
#pragma pack(push,1)
|
|
|
|
struct Context final
|
|
{
|
|
unsigned optLevel = 0;
|
|
unsigned sizeLeve = 0;
|
|
InterruptPointHandlerT interruptPointHandler = nullptr;
|
|
void* interruptPointHandlerData = nullptr;
|
|
FatalHandlerT fatalHandler = nullptr;
|
|
void* fatalHandlerData = nullptr;
|
|
DumpHandlerT dumpHandler = nullptr;
|
|
void* dumpHandlerData = nullptr;
|
|
};
|
|
#pragma pack(pop)
|
|
|
|
#endif // CONTEXT_H
|