Skip to content

Commit 8ff8216

Browse files
committed
Merge pull request #88418 from dsnopek/gdextension-unbind-methods
Unbind GDExtension methods that can't reasonably be used
2 parents 1b8e12c + 99fd6ca commit 8ff8216

File tree

3 files changed

+9
-28
lines changed

3 files changed

+9
-28
lines changed

core/extension/gdextension.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -807,12 +807,8 @@ void GDExtension::deinitialize_library(InitializationLevel p_level) {
807807
}
808808

809809
void GDExtension::_bind_methods() {
810-
ClassDB::bind_method(D_METHOD("open_library", "path", "entry_symbol"), &GDExtension::open_library);
811-
ClassDB::bind_method(D_METHOD("close_library"), &GDExtension::close_library);
812810
ClassDB::bind_method(D_METHOD("is_library_open"), &GDExtension::is_library_open);
813-
814811
ClassDB::bind_method(D_METHOD("get_minimum_library_initialization_level"), &GDExtension::get_minimum_library_initialization_level);
815-
ClassDB::bind_method(D_METHOD("initialize_library", "level"), &GDExtension::initialize_library);
816812

817813
BIND_ENUM_CONSTANT(INITIALIZATION_LEVEL_CORE);
818814
BIND_ENUM_CONSTANT(INITIALIZATION_LEVEL_SERVERS);

doc/classes/GDExtension.xml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,42 +12,18 @@
1212
<link title="GDExtension example in C++">$DOCS_URL/tutorials/scripting/gdextension/gdextension_cpp_example.html</link>
1313
</tutorials>
1414
<methods>
15-
<method name="close_library">
16-
<return type="void" />
17-
<description>
18-
Closes the current library.
19-
[b]Note:[/b] You normally should not call this method directly. This is handled automatically by [method GDExtensionManager.unload_extension].
20-
</description>
21-
</method>
2215
<method name="get_minimum_library_initialization_level" qualifiers="const">
2316
<return type="int" enum="GDExtension.InitializationLevel" />
2417
<description>
2518
Returns the lowest level required for this extension to be properly initialized (see the [enum InitializationLevel] enum).
2619
</description>
2720
</method>
28-
<method name="initialize_library">
29-
<return type="void" />
30-
<param index="0" name="level" type="int" enum="GDExtension.InitializationLevel" />
31-
<description>
32-
Initializes the library bound to this GDextension at the given initialization [param level].
33-
[b]Note:[/b] You normally should not call this method directly. This is handled automatically by [method GDExtensionManager.load_extension].
34-
</description>
35-
</method>
3621
<method name="is_library_open" qualifiers="const">
3722
<return type="bool" />
3823
<description>
3924
Returns [code]true[/code] if this extension's library has been opened.
4025
</description>
4126
</method>
42-
<method name="open_library">
43-
<return type="int" enum="Error" />
44-
<param index="0" name="path" type="String" />
45-
<param index="1" name="entry_symbol" type="String" />
46-
<description>
47-
Opens the library at the specified [param path].
48-
[b]Note:[/b] You normally should not call this method directly. This is handled automatically by [method GDExtensionManager.load_extension].
49-
</description>
50-
</method>
5127
</methods>
5228
<constants>
5329
<constant name="INITIALIZATION_LEVEL_CORE" value="0" enum="InitializationLevel">

misc/extension_api_validation/4.2-stable.expected

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,12 @@ GH-87340
120120
Validate extension JSON: JSON file: Field was added in a way that breaks compatibility 'classes/RenderingDevice/methods/screen_get_framebuffer_format': arguments
121121

122122
screen_get_framebuffer_format can now specify the screen it should get the format from. The argument defaults to the main window to emulate the behavior of the old function.
123+
124+
125+
GH-88418
126+
--------
127+
Validate extension JSON: API was removed: classes/GDExtension/methods/close_library
128+
Validate extension JSON: API was removed: classes/GDExtension/methods/initialize_library
129+
Validate extension JSON: API was removed: classes/GDExtension/methods/open_library
130+
131+
Since it was basically impossible to use these methods in any useful way, the GDExtension team agreed that breaking compatibility by removing them was OK.

0 commit comments

Comments
 (0)