mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 20:42:21 +00:00
LibCore: Add REGISTER_ABSTRACT_CORE_OBJECT
This behaves identically to REGISTER_CORE_OBJECT, but the resulting ObjectClassRegistration's construct() method will always return null.
This commit is contained in:
parent
c3b0b9057e
commit
9cf9e604c3
Notes:
sideshowbarker
2024-07-18 01:36:24 +09:00
Author: https://github.com/thislooksfun
Commit: 9cf9e604c3
Pull-request: https://github.com/SerenityOS/serenity/pull/10642
1 changed files with 7 additions and 0 deletions
|
@ -20,6 +20,13 @@
|
|||
|
||||
namespace Core {
|
||||
|
||||
#define REGISTER_ABSTRACT_CORE_OBJECT(namespace_, class_name) \
|
||||
namespace Core { \
|
||||
namespace Registration { \
|
||||
Core::ObjectClassRegistration registration_##class_name(#namespace_ "::" #class_name, []() { return RefPtr<Object>(); }); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define REGISTER_CORE_OBJECT(namespace_, class_name) \
|
||||
namespace Core { \
|
||||
namespace Registration { \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue