From c3858f267a278f50ce796faa843b3af0d71aab81 Mon Sep 17 00:00:00 2001 From: Google DeepMind Date: Wed, 5 Nov 2025 11:06:15 -0800 Subject: [PATCH] Change default values of `WrappedFieldData` string fields to empty strings. PiperOrigin-RevId: 828547058 Change-Id: I0dc0f993cd93a8feab3f1a53b7ee6c47266093e0 --- wasm/codegen/helpers/structs.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wasm/codegen/helpers/structs.py b/wasm/codegen/helpers/structs.py index c8600aa9..5e7d3898 100644 --- a/wasm/codegen/helpers/structs.py +++ b/wasm/codegen/helpers/structs.py @@ -35,22 +35,22 @@ class WrappedFieldData: """Data class for struct field definition and binding.""" # Line for struct field binding - binding: str + binding: str = "" # Line for struct field definition - definition: str | None = None + definition: str = "" # Initialization code for fields that require it - initialization: str | None = None + initialization: str = "" # Statement to reset the inner pointer when copying the field - ptr_copy_reset: str | None = None + ptr_copy_reset: str = "" # Whether the field is a primitive or fixed size is_primitive_or_fixed_size: bool = False # Underlying type of the field - typename: str | None = None + typename: str = "" @dataclasses.dataclass