Skip to content

Ensure GDCLASS can be used outside the godot namespace.#823

Merged
akien-mga merged 1 commit into
godotengine:masterfrom
Faless:fix/godot_namespace_requirement
Sep 2, 2022
Merged

Ensure GDCLASS can be used outside the godot namespace.#823
akien-mga merged 1 commit into
godotengine:masterfrom
Faless:fix/godot_namespace_requirement

Conversation

@Faless

@Faless Faless commented Sep 1, 2022

Copy link
Copy Markdown
Contributor

The GDCLASS macro should not assume to be called inside the godot namespace and should thus prefix function calls for that namespace with ::godot:: to ensure proper namespace referencing.

I suggest we also split the "internal" stuff (used by generated bindings) from wrapped.hpp into a separate wrapped_internal.hpp file to further convey the idea that GDCLASS is for users, but direct access to Wrapped and the GDNATIVE_CLASS macro are for internal use.

The `GDCLASS` macro should not assume to be called inside the `godot`
namespace and should thus prefix function calls for that namespace with
`::godot::` to ensure proper namespace referencing.
@Faless Faless added bug This has been identified as a bug topic:gdextension This relates to the new Godot 4 extension implementation labels Sep 1, 2022
@Faless
Faless requested a review from bruvzg September 1, 2022 04:29
@akien-mga
akien-mga merged commit 862d1f1 into godotengine:master Sep 2, 2022
@akien-mga

Copy link
Copy Markdown
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug This has been identified as a bug topic:gdextension This relates to the new Godot 4 extension implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants