Commit b687dca71f5d70fa326e17311dbeb937ec10e063

Thomas de Grivel 2017-06-27T15:57:22

babel-io-stream

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/babel-stream.lisp b/babel-stream.lisp
index b4688a4..3b41175 100644
--- a/babel-stream.lisp
+++ b/babel-stream.lisp
@@ -113,3 +113,11 @@
                         :stream (fd-stream:fd-output-stream 1))))
   (write-sequence s "Hello, world ! ÉÀÖÛŸ")
   (flush s))
+
+(defclass babel-io-stream (babel-input-stream babel-output-stream)
+  ())
+
+(defun babel-io-stream (stream &optional (external-format :utf-8))
+  (make-instance 'babel-io-stream
+                 :external-format external-format
+                 :stream stream))