1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-23 15:16:17 +00:00

[GDExtension] Fix registration of functions with enum or native pointer return type.

This commit is contained in:
bruvzg
2022-02-03 15:03:51 +02:00
parent 7f93eb34cf
commit ddd96b3059
6 changed files with 59 additions and 49 deletions

View File

@@ -230,8 +230,8 @@ void TextServerExtension::_bind_methods() {
GDVIRTUAL_BIND(_shaped_text_is_ready, "shaped");
GDVIRTUAL_BIND(_shaped_text_get_glyphs, "shaped", "r_glyphs");
GDVIRTUAL_BIND(_shaped_text_sort_logical, "shaped", "r_glyphs");
GDVIRTUAL_BIND(_shaped_text_get_glyphs, "shaped");
GDVIRTUAL_BIND(_shaped_text_sort_logical, "shaped");
GDVIRTUAL_BIND(_shaped_text_get_glyph_count, "shaped");
GDVIRTUAL_BIND(_shaped_text_get_range, "shaped");
@@ -243,7 +243,7 @@ void TextServerExtension::_bind_methods() {
GDVIRTUAL_BIND(_shaped_text_get_trim_pos, "shaped");
GDVIRTUAL_BIND(_shaped_text_get_ellipsis_pos, "shaped");
GDVIRTUAL_BIND(_shaped_text_get_ellipsis_glyph_count, "shaped");
GDVIRTUAL_BIND(_shaped_text_get_ellipsis_glyphs, "shaped", "r_glyphs");
GDVIRTUAL_BIND(_shaped_text_get_ellipsis_glyphs, "shaped");
GDVIRTUAL_BIND(_shaped_text_overrun_trim_to_width, "shaped", "width", "trim_flags");
@@ -505,7 +505,7 @@ void TextServerExtension::font_set_hinting(RID p_font_rid, TextServer::Hinting p
}
TextServer::Hinting TextServerExtension::font_get_hinting(RID p_font_rid) const {
int ret;
TextServer::Hinting ret;
if (GDVIRTUAL_CALL(_font_get_hinting, p_font_rid, ret)) {
return (TextServer::Hinting)ret;
}
@@ -955,7 +955,7 @@ void TextServerExtension::shaped_text_set_direction(RID p_shaped, TextServer::Di
}
TextServer::Direction TextServerExtension::shaped_text_get_direction(RID p_shaped) const {
int ret;
TextServer::Direction ret;
if (GDVIRTUAL_CALL(_shaped_text_get_direction, p_shaped, ret)) {
return (TextServer::Direction)ret;
}
@@ -963,7 +963,7 @@ TextServer::Direction TextServerExtension::shaped_text_get_direction(RID p_shape
}
TextServer::Direction TextServerExtension::shaped_text_get_inferred_direction(RID p_shaped) const {
int ret;
TextServer::Direction ret;
if (GDVIRTUAL_CALL(_shaped_text_get_inferred_direction, p_shaped, ret)) {
return (TextServer::Direction)ret;
}
@@ -975,7 +975,7 @@ void TextServerExtension::shaped_text_set_orientation(RID p_shaped, TextServer::
}
TextServer::Orientation TextServerExtension::shaped_text_get_orientation(RID p_shaped) const {
int ret;
TextServer::Orientation ret;
if (GDVIRTUAL_CALL(_shaped_text_get_orientation, p_shaped, ret)) {
return (TextServer::Orientation)ret;
}
@@ -1139,16 +1139,16 @@ bool TextServerExtension::shaped_text_is_ready(RID p_shaped) const {
}
const Glyph *TextServerExtension::shaped_text_get_glyphs(RID p_shaped) const {
const Glyph *ret;
if (GDVIRTUAL_CALL(_shaped_text_get_glyphs, p_shaped, &ret)) {
GDNativePtr<Glyph> ret;
if (GDVIRTUAL_CALL(_shaped_text_get_glyphs, p_shaped, ret)) {
return ret;
}
return nullptr;
}
const Glyph *TextServerExtension::shaped_text_sort_logical(RID p_shaped) {
const Glyph *ret;
if (GDVIRTUAL_CALL(_shaped_text_sort_logical, p_shaped, &ret)) {
GDNativePtr<Glyph> ret;
if (GDVIRTUAL_CALL(_shaped_text_sort_logical, p_shaped, ret)) {
return ret;
}
return nullptr;
@@ -1211,8 +1211,8 @@ int TextServerExtension::shaped_text_get_ellipsis_pos(RID p_shaped) const {
}
const Glyph *TextServerExtension::shaped_text_get_ellipsis_glyphs(RID p_shaped) const {
const Glyph *ret;
if (GDVIRTUAL_CALL(_shaped_text_get_ellipsis_glyphs, p_shaped, &ret)) {
GDNativePtr<Glyph> ret;
if (GDVIRTUAL_CALL(_shaped_text_get_ellipsis_glyphs, p_shaped, ret)) {
return ret;
}
return nullptr;