diff options
author | reduz <reduzio@gmail.com> | 2022-05-03 11:56:08 +0200 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2022-05-04 17:34:51 +0200 |
commit | de0ca3b999819a99a5dcab99f0083a760277b95e (patch) | |
tree | 3078cc65c19bdedfb25c977c48b50e44003a2802 /core/extension | |
parent | 0a9d31a7eb9debe30cd5078688e895d2ce3f2efa (diff) |
Refactor module initialization
* Changed to use the same stages as extensions.
* Makes the initialization more coherent, helping solve problems due to lack of stages.
* Makes it easier to port between module and extension.
* removed the DRIVER initialization level (no longer needed).
Diffstat (limited to 'core/extension')
-rw-r--r-- | core/extension/gdnative_interface.h | 1 | ||||
-rw-r--r-- | core/extension/native_extension.cpp | 1 | ||||
-rw-r--r-- | core/extension/native_extension.h | 9 |
3 files changed, 4 insertions, 7 deletions
diff --git a/core/extension/gdnative_interface.h b/core/extension/gdnative_interface.h index ad4c8917df..4d2682b253 100644 --- a/core/extension/gdnative_interface.h +++ b/core/extension/gdnative_interface.h @@ -556,7 +556,6 @@ typedef enum { GDNATIVE_INITIALIZATION_CORE, GDNATIVE_INITIALIZATION_SERVERS, GDNATIVE_INITIALIZATION_SCENE, - GDNATIVE_INITIALIZATION_DRIVER, GDNATIVE_INITIALIZATION_EDITOR, GDNATIVE_MAX_INITIALIZATION_LEVEL, } GDNativeInitializationLevel; diff --git a/core/extension/native_extension.cpp b/core/extension/native_extension.cpp index 4fc7d71387..e6a0c2ce89 100644 --- a/core/extension/native_extension.cpp +++ b/core/extension/native_extension.cpp @@ -334,7 +334,6 @@ void NativeExtension::_bind_methods() { BIND_ENUM_CONSTANT(INITIALIZATION_LEVEL_CORE); BIND_ENUM_CONSTANT(INITIALIZATION_LEVEL_SERVERS); BIND_ENUM_CONSTANT(INITIALIZATION_LEVEL_SCENE); - BIND_ENUM_CONSTANT(INITIALIZATION_LEVEL_DRIVER); BIND_ENUM_CONSTANT(INITIALIZATION_LEVEL_EDITOR); } diff --git a/core/extension/native_extension.h b/core/extension/native_extension.h index d29ccd81b8..c1700f3538 100644 --- a/core/extension/native_extension.h +++ b/core/extension/native_extension.h @@ -70,11 +70,10 @@ public: void close_library(); enum InitializationLevel { - INITIALIZATION_LEVEL_CORE, - INITIALIZATION_LEVEL_SERVERS, - INITIALIZATION_LEVEL_SCENE, - INITIALIZATION_LEVEL_DRIVER, - INITIALIZATION_LEVEL_EDITOR, + INITIALIZATION_LEVEL_CORE = GDNATIVE_INITIALIZATION_CORE, + INITIALIZATION_LEVEL_SERVERS = GDNATIVE_INITIALIZATION_SERVERS, + INITIALIZATION_LEVEL_SCENE = GDNATIVE_INITIALIZATION_SCENE, + INITIALIZATION_LEVEL_EDITOR = GDNATIVE_INITIALIZATION_EDITOR }; bool is_library_open() const; |