enforce ctx in constructor

Signed-off-by: Faumaray <faumaray@gmail.com>
This commit is contained in:
faumaray committed 2025-10-20 01:09:53 +03:00
1 parent 766c612cf8
commit 02a077431d
2 files changed
+42 -20

No files matched your search

+2 -5
View File
@@ -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