mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-16 18:47:32 -05:00
New marshalling function put_datapl().
Just like put_data(), but takes a ptrlen rather than separate ptr and len arguments, so it saves a bit of repetition at call sites. I probably should have written this ages ago, but better late than never; I've also converted every call site I can find that needed it.
This commit is contained in:
@ -128,6 +128,8 @@ struct BinarySink {
|
||||
* rest of these macros. */
|
||||
#define put_data(bs, val, len) \
|
||||
BinarySink_put_data(BinarySink_UPCAST(bs), val, len)
|
||||
#define put_datapl(bs, pl) \
|
||||
BinarySink_put_datapl(BinarySink_UPCAST(bs), pl)
|
||||
|
||||
/*
|
||||
* The underlying real C functions that implement most of those
|
||||
@ -140,6 +142,7 @@ struct BinarySink {
|
||||
* declaration(s) of their other parameter type(s) are in scope.
|
||||
*/
|
||||
void BinarySink_put_data(BinarySink *, const void *data, size_t len);
|
||||
void BinarySink_put_datapl(BinarySink *, ptrlen);
|
||||
void BinarySink_put_padding(BinarySink *, size_t len, unsigned char padbyte);
|
||||
void BinarySink_put_byte(BinarySink *, unsigned char);
|
||||
void BinarySink_put_bool(BinarySink *, bool);
|
||||
|
Reference in New Issue
Block a user