Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String::resize() isn't exposed to GDExtension #1141

Closed
dsnopek opened this issue Jun 15, 2023 · 0 comments · Fixed by #1166
Closed

String::resize() isn't exposed to GDExtension #1141

dsnopek opened this issue Jun 15, 2023 · 0 comments · Fixed by #1166
Labels
enhancement This is an enhancement on the current functionality topic:gdextension This relates to the new Godot 4 extension implementation

Comments

@dsnopek
Copy link
Collaborator

dsnopek commented Jun 15, 2023

Godot version

v4.1.beta.custom_build.19c1d3c7a

godot-cpp version

4.1.dev (1bc9ca7)

System information

Linux

Issue description

Presently, there is no String::resize() method, like we have available in Godot modules.

This is limiting, because it requires that we create a new char[], put the data in there, and then copy from the char[] into the string, and then delete it.

This was discovered when trying to compile the text_server_adv module in Godot as a GDExtension.

See: godotengine/godot#77532

Steps to reproduce

# Assuming you have Godot's source code in 'godot'
cd godot/modules/text_server_adv/gdextension_build
scons

Minimal reproduction project

n/a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is an enhancement on the current functionality topic:gdextension This relates to the new Godot 4 extension implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant