google / emboss

Emboss is a tool for generating code that reads and writes binary data structures.
Apache License 2.0
71 stars 21 forks source link

Add `ir_data_utils.copy` and `update` #145

Closed EricRahm closed 4 months ago

EricRahm commented 4 months ago

This adds ir_data_utils helpers to handle copying and updating ir_data instances. Some instances of CopyFrom that aren't associated with a builder are updated to use copy or update.

Part of #118.

EricRahm commented 4 months ago

FYI @robrussell

EricRahm commented 4 months ago

Not sure if you saw the question about header_generator_test.py - it has the only remaining direct calls to CopyFrom, did you intend to update those too?

It's used in a few files, the changes I made here were instances that aren't already using a builder. The ones in header_generator_test are all essentially builder(...).CopyFrom.