Uses StringName in GDExtension perf critical instance creation & method/properties setter/getter#896
Conversation
a8f9c55 to
52bbbaa
Compare
bruvzg
left a comment
There was a problem hiding this comment.
Looks really good.
A few missing things:
_alloc_and_copy_cstrhelper functions can be removed fromwrapper.hpp,class_db.hppandmethod_bind.hpp.- There's
GDNativeExtensionScriptInstanceToStringwhich is defined to returnconst char *, but in the engine its return is assigned toString, probably should be changed as well. - Also, you have missed
__constant_get_bitfield_name(in thetype_info.hpp).
|
@bruvzg thanks for the quick feedbacks 😃 I've updated the PR with your remarks |
c368bde to
40d2e45
Compare
|
@bruvzg While I'm at at it, I wonder why in Godot the I suspect this is not really intended, but it creates the impression two instances of the same script can have different property/methods. I think it's a good thing to consider a script can never change once loaded (this is the kind of assertion that is expected, so you can be sure plenty of things will break in subtile way if an extension starts to do that) So my guess is we should correct this (or at least add comment on |
0f06f94 to
4b815a1
Compare
|
This PR is running fine with the demo project, so I guess this is ready for review & merge \o/ |
a698181 to
feadd9a
Compare
I think it's a bind for the |
…thod/properties setter/getter
feadd9a to
b6ba0dc
Compare
|
@touilleMan I believe this PR might have caused #921 to happen. Could you confirm whether it's likely ? |
|
@groud that's most likely the case ! I'll try to have an eye on this before our Thursday meeting 🤠 |
related to godotengine/godot#67750