Revision 0b7bf465
ID | 0b7bf4652adb018d41c41bb5a6d1f428773862f3 |
Parent | c777c5fc |
Child | eb577716 |
Fix typing problems in TH that generates field code
See #677: The code generated by TH had different types depending on if
a field had a default value and/or custom reader. Simple cases worked by
accident, but more complex ones failed.
This patch distinguishes properly between optional fields and mandatory
fields and applies custom field reader functions and default values
accordingly.
This also covers the problem fixed in [5b4ed56e].
Also remove unneeded makeReadOptional. Now that handling optional
fields is corrected, this helper function is no longer necessary.
Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Files
- added
- modified
- copied
- renamed
- deleted