enforce ctx in constructor
Signed-off-by: Faumaray <faumaray@gmail.com>
This commit is contained in:
2 files changed
+42
-20
No files matched your search
@@ -5,15 +5,12 @@
|
||||
|
||||
namespace vl::mod {
|
||||
|
||||
// Registration record stored in the module's custom section.
|
||||
// Core will scan this in the loaded .so to find available mods.
|
||||
struct Registration {
|
||||
const void* magic;
|
||||
std::unique_ptr<Base> (*factory)(const Context&);
|
||||
const char* typeName; // e.g., typeid(T).name()
|
||||
const char* name; // COMPILE-TIME mod name (from T::Name())
|
||||
const char* version; // COMPILE-TIME mod version (from T::Version())
|
||||
};
|
||||
|
||||
inline constexpr std::uintptr_t kModRegMagicRaw = 0xBADC0FFEEULL;
|
||||
inline const void* kModRegMagic = reinterpret_cast<const void*>(kModRegMagicRaw);
|
||||
|
||||
} // namespace vl::log
|
||||
Reference in new issue
Block a user