| 613 | |
| 614 | |
| 615 | class ComplexObject1Serializer(pyfory.serializer.Serializer): |
| 616 | def write(self, write_context, value): |
| 617 | write_context.write_ref(value.f1) |
| 618 | write_context.write_ref(value.f2) |
| 619 | write_context.write_ref(value.f3) |
| 620 | |
| 621 | def read(self, read_context): |
| 622 | obj = ComplexObject1(*([None] * len(typing.get_type_hints(ComplexObject1).keys()))) |
| 623 | read_context.reference(obj) |
| 624 | obj.f1 = read_context.read_ref() |
| 625 | obj.f2 = read_context.read_ref() |
| 626 | obj.f3 = read_context.read_ref() |
| 627 | return obj |
| 628 | |
| 629 | |
| 630 | @cross_language_test |
no outgoing calls