(self, tuple_type: RTuple)
| 570 | # Higher-level operations |
| 571 | |
| 572 | def declare_tuple_struct(self, tuple_type: RTuple) -> None: |
| 573 | if tuple_type.struct_name not in self.context.declarations: |
| 574 | dependencies = set() |
| 575 | for typ in tuple_type.types: |
| 576 | # XXX other types might eventually need similar behavior |
| 577 | if isinstance(typ, RTuple): |
| 578 | dependencies.add(typ.struct_name) |
| 579 | |
| 580 | self.context.declarations[tuple_type.struct_name] = HeaderDeclaration( |
| 581 | self.tuple_c_declaration(tuple_type), dependencies=dependencies, is_type=True |
| 582 | ) |
| 583 | |
| 584 | def emit_inc_ref(self, dest: str, rtype: RType, *, rare: bool = False) -> None: |
| 585 | """Increment reference count of C expression `dest`. |
no test coverage detected