davidchisnall / dtc

FreeBSD Device Tree Compiler
18 stars 15 forks source link

Handle top-level /delete-node/ directives. #72

Closed davidchisnall closed 2 years ago

davidchisnall commented 2 years ago

These take a label as the argument and will delete the label, wherever it is in the final tree.

Fixes #64

davidchisnall commented 2 years ago

This PR also removes some premature optimisation to make the memory management more safe. node_ptr is now a shared_ptr rather than a unique_ptr and all of the non-owning pointers remain shared_ptrs. Some of them could be turned into weak pointers in a future PR.