| OLD | NEW |
| 1 {# TODO(yzshen): Make these templates more readable. #} | 1 {# TODO(yzshen): Make these templates more readable. #} |
| 2 | 2 |
| 3 {# Computes the serialized size for the specified struct. | 3 {# Computes the serialized size for the specified struct. |
| 4 |struct| is the struct definition. | 4 |struct| is the struct definition. |
| 5 |input_field_pattern| should be a pattern that contains one string | 5 |input_field_pattern| should be a pattern that contains one string |
| 6 placeholder, for example, "input->%s", "p_%s". The placeholder will be | 6 placeholder, for example, "input->%s", "p_%s". The placeholder will be |
| 7 substituted with struct field names to refer to the input fields. | 7 substituted with struct field names to refer to the input fields. |
| 8 This macro is expanded to compute seriailized size for both: | 8 This macro is expanded to compute seriailized size for both: |
| 9 - user-defined structs: the input is an instance of the corresponding struct | 9 - user-defined structs: the input is an instance of the corresponding struct |
| 10 wrapper class. | 10 wrapper class. |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 all generated structs: | 273 all generated structs: |
| 274 - user-defined mojo structs | 274 - user-defined mojo structs |
| 275 - interface method params/response params #} | 275 - interface method params/response params #} |
| 276 {%- macro structptr_forward_decl(struct) -%} | 276 {%- macro structptr_forward_decl(struct) -%} |
| 277 class {{struct.name}}; | 277 class {{struct.name}}; |
| 278 {% if struct|should_inline %} | 278 {% if struct|should_inline %} |
| 279 using {{struct.name}}Ptr = mojo::InlinedStructPtr<{{struct.name}}>; | 279 using {{struct.name}}Ptr = mojo::InlinedStructPtr<{{struct.name}}>; |
| 280 {% else %} | 280 {% else %} |
| 281 using {{struct.name}}Ptr = mojo::StructPtr<{{struct.name}}>; | 281 using {{struct.name}}Ptr = mojo::StructPtr<{{struct.name}}>; |
| 282 {% endif %} | 282 {% endif %} |
| 283 {% endmacro %} | 283 {% endmacro %} |
| OLD | NEW |