Fix object return value of builtin types' methods.#1363
Conversation
ca2da27 to
79f3e77
Compare
|
Thanks! I haven't tested, although, looking at the code I think you're right about the bug here. However, rather than having the For example, we have We could add an equivalent |
79f3e77 to
29d19fb
Compare
|
@dsnopek OK, I added |
dsnopek
left a comment
There was a problem hiding this comment.
Thanks!
However, it would be nice if this code was also re-organized to look like the similar pre-existing code for engine classes - see https://github.com/godotengine/godot-cpp/blob/master/binding_generator.py#L1585
I personally find that a little easier to follow, and it'll make maintaining both chunks of code easier if they have roughly the same structure. Comparing with that code, we also may be missing a case related to enums?
| result.append(method_signature + "{") | ||
|
|
||
| method_call = "\t" | ||
| need_additional_right_bracke = False |
There was a problem hiding this comment.
There's a type-o here - this variable name should end with a t. However, I think it'd be better if this was made to look more like the code for engine classes which use is_ref as the variable for this. See https://github.com/godotengine/godot-cpp/blob/master/binding_generator.py#L1585
07f5a72 to
544675a
Compare
544675a to
6a3753c
Compare
|
@dsnopek Although I make it like engine classes now, it seems that there have not method with enum return type in builtin types. |
dsnopek
left a comment
There was a problem hiding this comment.
Thanks! This looks great to me
|
Cherry-picked for 4.2 in PR #1410 |
|
Cherry-picked for 4.1 in PR #1411 |
Currently
Signal::get_object()andCallable::get_object()will return an invalidObject *without converting byinternal::get_object_instance_binding().This pr fix this problem by adding necessary Conversion for builtin types in binding generator.