commit de0a7d93c36e055470fbbbd932a96f9ee2167b92
parent d5cfa6bdc8dbd34c0cbc62e46a75511a475f3a5d
Author: Drew DeVault <sir@cmpwn.com>
Date: Fri, 27 May 2022 13:15:34 +0200
encoding::pem: accept arbitrary I/O handle
Signed-off-by: Drew DeVault <sir@cmpwn.com>
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/encoding/pem/pem.ha b/encoding/pem/pem.ha
@@ -199,7 +199,7 @@ fn b64_read(st: *io::stream, buf: []u8) (size | io::EOF | io::error) = {
export type pemencoder = struct {
stream: io::stream,
- out: *io::stream,
+ out: io::handle,
b64: base64::encoder,
label: str,
};
@@ -212,7 +212,7 @@ const pemencoder_vt: io::vtable = io::vtable {
// Creates a new PEM encoder stream. The stream has to be closed to write the
// trailer.
-export fn newencoder(label: str, s: *io::stream) (pemencoder | io::error) = {
+export fn newencoder(label: str, s: io::handle) (pemencoder | io::error) = {
fmt::fprintf(s, "{}{}{}\n", begin, label, suffix)?;
return pemencoder {
stream = &pemencoder_vt,