diff --git a/readme.md b/readme.md index 8439b1e..5cfcb40 100644 --- a/readme.md +++ b/readme.md @@ -28,12 +28,6 @@ This project can be thought as having three layers: ## Building -> **Note** -> -> This extension depends on the following currently unmerged pull request to Godot: -> -> - [Allow CallableCustom objects to be created from GDExtensions (extended) godotengine/godot#79005](https://github.com/godotengine/godot/pull/79005) - To clone and initialize the repository: ```sh git clone https://github.com/maiself/godot-python-extension.git diff --git a/src/variant/callable.cpp b/src/variant/callable.cpp index 60e0e0e..c5a2261 100644 --- a/src/variant/callable.cpp +++ b/src/variant/callable.cpp @@ -9,7 +9,9 @@ void func_to_callable(GDExtensionUninitializedTypePtr ptr, py::function func) { static GDExtensionObjectPtr object = nullptr; // XXX if(!object) { - object = extension_interface::classdb_construct_object(StringName("Object")); // XXX: godot is currently requiring an object for callables + // XXX: godot is currently requiring an object for callables + // see: https://github.com/godotengine/godot/issues/81887 + object = extension_interface::classdb_construct_object(StringName("Object")); register_cleanup_func([]() { extension_interface::object_destroy(object); @@ -18,6 +20,7 @@ void func_to_callable(GDExtensionUninitializedTypePtr ptr, py::function func) { GDExtensionCallableCustomInfo info = { .callable_userdata = func.ptr(), + .token = extension_interface::token, .object = object, // XXX .call_func = [](void* userdata, const GDExtensionConstVariantPtr* args,