mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
srcpos: Define srcpos_free
srcpos can be chained together using srcpos_extend. However, in such cases, we need to free all the chained nodes. srcpos_free is a helper to recursively free all the linked srcpos. Signed-off-by: Ayush Singh <ayush@beagleboard.org> Message-ID: <20250605-previous-value-v3-1-0983d0733a07@beagleboard.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
e0b7749c26
commit
b841391bbd
3 changed files with 13 additions and 1 deletions
1
srcpos.h
1
srcpos.h
|
@ -88,6 +88,7 @@ extern void srcpos_update(struct srcpos *pos, const char *text, int len);
|
|||
extern struct srcpos *srcpos_copy(struct srcpos *pos);
|
||||
extern struct srcpos *srcpos_extend(struct srcpos *new_srcpos,
|
||||
struct srcpos *old_srcpos);
|
||||
extern void srcpos_free(struct srcpos *pos);
|
||||
extern char *srcpos_string(struct srcpos *pos);
|
||||
extern char *srcpos_string_first(struct srcpos *pos, int level);
|
||||
extern char *srcpos_string_last(struct srcpos *pos, int level);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue