Do not delete attached specs after compilation.

Also, copy them when copying the spec.

PiperOrigin-RevId: 688998464
Change-Id: I7229fd8032eafede582194ccf73ab4160fe06768
This commit is contained in:
Alessio Quaglino
2024-10-23 09:41:07 -07:00
committed by Copybara-Service
parent e14aebfd16
commit d17d9e835c
9 changed files with 95 additions and 10 deletions
+22
View File
@@ -9742,6 +9742,28 @@ FUNCTIONS: Mapping[str, FunctionDecl] = dict([
),
doc='Get spec from body.',
)),
('mjs_findSpec',
FunctionDecl(
name='mjs_findSpec',
return_type=PointerType(
inner_type=ValueType(name='mjSpec'),
),
parameters=(
FunctionParameterDecl(
name='spec',
type=PointerType(
inner_type=ValueType(name='mjSpec'),
),
),
FunctionParameterDecl(
name='name',
type=PointerType(
inner_type=ValueType(name='char', is_const=True),
),
),
),
doc='Find spec (model asset) by name.',
)),
('mjs_findBody',
FunctionDecl(
name='mjs_findBody',