Skip to content

Commit 78add89

Browse files
saran-tcopybara-github
authored andcommitted
Make bindings generator ignore X macros except for mj{Model,Data}.
PiperOrigin-RevId: 866412775 Change-Id: Idee7d56db469a06af3e1688bb2c4ba6362b4f727
1 parent 4c29bdd commit 78add89

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

dm_control/autowrap/binding_generator.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,11 @@ def parse_hints(self, xmacro_src):
159159
parser = header_parsing.XMACRO
160160
for tokens, _, _ in parser.scanString(xmacro_src):
161161
for xmacro in tokens:
162+
if not (
163+
xmacro.name.startswith("MJMODEL")
164+
or xmacro.name.startswith("MJDATA")
165+
):
166+
continue
162167
for member in xmacro.members:
163168
if not hasattr(member, "name") or not member.name:
164169
continue

0 commit comments

Comments
 (0)