Rename source/sink custom operations for export.
authorChris Hanson <org/chris-hanson/cph>
Wed, 11 Jan 2017 05:12:51 +0000 (21:12 -0800)
committerChris Hanson <org/chris-hanson/cph>
Wed, 11 Jan 2017 05:12:51 +0000 (21:12 -0800)
src/runtime/binary-port.scm
src/runtime/runtime.pkg

index c129ea01de4a83bd66b51f07f960ea53348fb897..d6f5bf6211fd2f784c05ecf843e638e932dc36ad 100644 (file)
@@ -151,13 +151,14 @@ USA.
 
 (define (get-output-bytevector port)
   (guarantee bytevector-output-port? port 'get-output-bytevector)
-  ((sink-custom-ref (buffer-source/sink (port-output-buffer port)) 1)))
+  ((output-sink-custom-ref (buffer-source/sink (port-output-buffer port)) 1)))
 
 (define (bytevector-output-port? object)
   (and (binary-output-port? object)
        (let ((sink (buffer-source/sink (port-output-buffer object))))
-        (and (fix:= (sink-custom-length sink) 2)
-             (eq? bytevector-output-port-tag (sink-custom-ref sink 0))))))
+        (and (fix:= (output-sink-custom-length sink) 2)
+             (eq? bytevector-output-port-tag
+                  (output-sink-custom-ref sink 0))))))
 
 (define bytevector-output-port-tag
   (list 'bytevector-output-port-tag))
@@ -671,10 +672,10 @@ USA.
 (define (source-read-bytes! source bv bs be)
   ((vector-ref (source/sink-custom source) 1) bv bs be))
 
-(define (source-custom-length source)
+(define (input-source-custom-length source)
   (fix:- (vector-length (source/sink-custom source)) 2))
 
-(define (source-custom-ref source index)
+(define (input-source-custom-ref source index)
   (vector-ref (source/sink-custom source) (fix:+ index 2)))
 
 (define (make-channel-output-sink channel)
@@ -688,8 +689,8 @@ USA.
 (define (sink-write-bytes sink bv bs be)
   ((vector-ref (source/sink-custom sink) 0) bv bs be))
 
-(define (sink-custom-length sink)
+(define (output-sink-custom-length sink)
   (fix:- (vector-length (source/sink-custom sink)) 1))
 
-(define (sink-custom-ref sink index)
+(define (output-sink-custom-ref sink index)
   (vector-ref (source/sink-custom sink) (fix:+ index 1)))
\ No newline at end of file
index 7c4406c62815c18a44ae27a3e2d02428d07d91df..5c01f3dc300e2192b70938b639d7f6cf566b507b 100644 (file)
@@ -2438,6 +2438,8 @@ USA.
   (export (runtime)
          (input-source-channel source/sink-channel)
          (output-source-channel source/sink-channel)
+         input-source-custom-length
+         input-source-custom-ref
          input-source?
          make-binary-i/o-port
          make-binary-input-port
@@ -2446,6 +2448,8 @@ USA.
          make-channel-output-sink
          make-non-channel-input-source
          make-non-channel-output-sink
+         output-sink-custom-length
+         output-sink-custom-ref
          output-sink?)
   (export (runtime port)
          binary-i/o-port?