Remove mjMARKSTACK and mjFREESTACK macros.

PiperOrigin-RevId: 562844184
Change-Id: Id2f57f5d132c47094dad75c6dab7297d7aa73458
This commit is contained in:
Saran Tunyasuvunakool
2023-09-05 11:41:01 -07:00
committed by Copybara-Service
parent 329ed193ac
commit 4929077211
35 changed files with 239 additions and 258 deletions
-33
View File
@@ -43,39 +43,6 @@ API function can be classified as:
Macros
^^^^^^
.. _mjMARKSTACK:
mjMARKSTACK
~~~~~~~~~~~
.. code-block:: C
#define mjMARKSTACK int _mark = d->pstack;
This macro is helpful when using the MuJoCo stack in custom computations. It works together with the next macro and the
:ref:`mj_stackAlloc` family of functions, and assumes that mjData\* d is defined. The use pattern is this:
.. code-block:: C
mjMARKSTACK;
mjtNum* temp = mj_stackAllocNum(d, 100);
// ... use temp as needed
mjFREESTACK;
.. _mjFREESTACK:
mjFREESTACK
~~~~~~~~~~~
.. code-block:: C
#define mjFREESTACK d->pstack = _mark;
Reset the MuJoCo stack pointer to the variable \_mark, normally saved by mjMARKSTACK.
.. _mjDISABLED:
mjDISABLED