Modified walker with pre/post walk callbacks and a carry_out/carry_in ptr that can be used to transfer data from pre to post.
This commit is contained in:
@@ -175,6 +175,12 @@ extern "C" {
|
||||
uint8_t day;
|
||||
};
|
||||
|
||||
struct walker_callbacks {
|
||||
void (*pre)(Node n, void *data, void **carry_out);
|
||||
void (*post)(Node n, void *data, void **carry_in);
|
||||
void *data;
|
||||
};
|
||||
|
||||
//
|
||||
// === BINARY DATA OVERLAYS ===
|
||||
//
|
||||
@@ -260,7 +266,7 @@ extern "C" {
|
||||
* Data is walked sequentially. Nodes passed to `cb` will be strictly increasing
|
||||
* in terms of memory location within the buffer.
|
||||
*/
|
||||
void espr_walk(char *data, size_t size, void (*cb)(Node n, void *pt), void *pt);
|
||||
void espr_walk(char *data, size_t size, struct walker_callbacks cb);
|
||||
|
||||
/* `espr_print` prints the header of every group and record in the given
|
||||
* esp/esm binary data.
|
||||
|
||||
Reference in New Issue
Block a user