binding_generator: include core/version.hpp in core/defs.hpp#1944
binding_generator: include core/version.hpp in core/defs.hpp#1944dsnopek merged 1 commit intogodotengine:masterfrom
Conversation
|
Thanks! I wonder if we should include |
5050db2 to
7ae5f5c
Compare
Make sense to me. I've pushed the update. The |
dsnopek
left a comment
There was a problem hiding this comment.
Thanks! Looks good to me
|
Ah, sorry, I just noticed this has multiple commits. Can you squash your PR into a single commit? |
c2ad6e2 to
a6b82b7
Compare
….hpp when dictionary.hpp is also included.
Done. The presence of a merge commit pulled into my fork made things non-trivial when rebasing but it's sorted now. BTW it's possible adjust the repo settings to only allow squashed merging of PRs where Github does the commit squashing automatically. |
|
Thank you! |
TypedDictionaryfails to compile due to include-order dependencyThis fixes
use of undeclared identifier 'set_typed'in typed_dictionary.hpp when dictionary.hpp is also included.Fixes a compile failure where
TypedDictionarymay reportset_typedas undeclared depending on include order. The generateddictionary.hppusesGODOT_VERSION_MINORbut did not includecore/version.hpp, causing the preprocessor guard aroundset_typedto evaluate before version macros were defined.This patch updates the generator soDictionaryheaders always includegodot_cpp/core/version.hppbefore version-gated declarations.This patch adds an include for version.hpp in defs.hpp as a general fix to this & similar potential problems.
Minimal reproducer
File:
test/repro_typed_dictionary_include_order.cppCompile command (from godot-cpp repo root):
Fixes #1942