Use a dedicated function for wrapper struct names

This change introduces a `wrapper_struct_name` function in `structs.py` to consistently generate the name of the C++ wrapper struct from a C struct name. All call sites in `functions.py` and `structs.py` that previously used `common.capitalize` for this purpose now call `wrapper_struct_name`.

PiperOrigin-RevId: 837544242
Change-Id: Ibe5fea8294283dae63bb8d064fd8beb8cfd3f2fe
This commit is contained in:
Google DeepMind
2025-11-27 08:41:25 -08:00
committed by Copybara-Service
parent 9ca1598b23
commit 8a5c52d395
11 changed files with 146 additions and 98 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ async function main() {
try {
console.log('Hello world!: Loading model');
model = mujoco.MjModel.loadFromXML('/working/hello.xml');
model = mujoco.MjModel.mj_loadXML('/working/hello.xml');
if (!model) {
throw new Error('Failed to load model');
}