Rename mj_stackAllocByte to mj_stackAlloc and make it public.

PiperOrigin-RevId: 561133040
Change-Id: I4f5ffe51c1287aa0c82af68bfe17ed6dd2ad09da
This commit is contained in:
Saran Tunyasuvunakool
2023-08-29 14:07:02 -07:00
committed by Copybara-Service
parent a48e0aa355
commit 4c899b92cc
16 changed files with 93 additions and 46 deletions
+24
View File
@@ -677,6 +677,30 @@ FUNCTIONS: Mapping[str, FunctionDecl] = dict([
),
doc='Reset data, set fields from specified keyframe.',
)),
('mj_stackAlloc',
FunctionDecl(
name='mj_stackAlloc',
return_type=PointerType(
inner_type=ValueType(name='void'),
),
parameters=(
FunctionParameterDecl(
name='d',
type=PointerType(
inner_type=ValueType(name='mjData'),
),
),
FunctionParameterDecl(
name='bytes',
type=ValueType(name='size_t'),
),
FunctionParameterDecl(
name='alignment',
type=ValueType(name='size_t'),
),
),
doc='Allocate a specific number of bytes on mjData stack. Call mju_error on stack overflow.', # pylint: disable=line-too-long
)),
('mj_stackAllocNum',
FunctionDecl(
name='mj_stackAllocNum',