libbio: add aux pointer to bio
This allows us to attach additional context to the biobuf so can read from some sort of data structure without a global variable.
This commit is contained in:
parent
b5086c1863
commit
dbd54342fd
2 changed files with 12 additions and 1 deletions
|
@ -34,6 +34,7 @@ struct Biobufhdr
|
|||
uchar* gbuf; /* pointer to good data in buf */
|
||||
void (*errorf)(char *); /* called on error if not nil */
|
||||
int (*iof)(Biobufhdr*, void *, long); /* called to do i/o */
|
||||
void *aux; /* user data */
|
||||
};
|
||||
|
||||
struct Biobuf
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue