blob: 4aca713216b20b477f79566829c20d4a54e7d4ba (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#pragma once
namespace NPrivate {
struct ICB {
virtual void Apply(const char* mod, const char* name, void* sym) = 0;
};
void ForEachSymbol(ICB& cb);
void RegisterSymbol(const char* mod, const char* name, void* sym);
}
#define BEGIN_SYMS(name) \
namespace { \
static struct TRegister { \
const char* ModuleName = name; \
inline TRegister() {
#define END_SYMS() \
} \
} \
REGISTRY; \
}
#define SYM_2(n, s) ::NPrivate::RegisterSymbol(this->ModuleName, n, (void*)&s);
#define SYM(s) SYM_2(#s, s);
|