OLD | NEW |
1 {%- set class_name = struct.name ~ "_Data" %} | 1 {%- set class_name = struct.name ~ "_Data" %} |
2 {%- if struct|is_struct_with_handles %} | 2 {%- if struct|is_struct_with_handles %} |
3 static void {{class_name}}_Destructor(void* address) { | 3 static void {{class_name}}_Destructor(void* address) { |
4 {{class_name}}* data = static_cast<{{class_name}}*>(address); | 4 {{class_name}}* data = static_cast<{{class_name}}*>(address); |
5 {%- for pf in struct.packed.packed_fields %} | 5 {%- for pf in struct.packed.packed_fields %} |
6 {%- if pf.field.kind|is_handle_kind %} | 6 {%- if pf.field.kind|is_handle_kind %} |
7 (void) mojo::MakePassable(data->{{pf.field.name}}()).Pass(); | 7 (void) mojo::MakePassable(data->{{pf.field.name}}()).Pass(); |
8 {%- endif %} | 8 {%- endif %} |
9 {%- endfor %} | 9 {%- endfor %} |
10 } | 10 } |
11 {%- endif %} | 11 {%- endif %} |
OLD | NEW |