Skip to content

Commit 7118691

Browse files
authored
Merge pull request #1298 from godot-rust/qol/dynamic-class-name
`ClassName` construction from dynamic values
2 parents f46e14a + 1641757 commit 7118691

File tree

4 files changed

+332
-103
lines changed

4 files changed

+332
-103
lines changed

godot-codegen/src/generator/classes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ fn make_class(class: &Class, ctx: &mut Context, view: &ApiView) -> GeneratedClas
248248
// Optimization note: instead of lazy init, could use separate static which is manually initialized during registration.
249249
static CLASS_NAME: std::sync::OnceLock<ClassName> = std::sync::OnceLock::new();
250250

251-
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(#class_name_cstr));
251+
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::__alloc_next_ascii(#class_name_cstr));
252252
*name
253253
}
254254

0 commit comments

Comments
 (0)