浏览代码

ABCL patch for STREAM-FILE-POSITION. By Mark Evenson <evenson@panix.com>.

avodonosov 15 年之前
父节点
当前提交
f8e70a823f
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 8 1
      mixin.lisp

+ 8 - 1
mixin.lisp

@@ -41,7 +41,14 @@
   
   (defmethod gray-streams:stream-write-string 
       ((stream xp::xp-structure) string &optional (start 0) (end (length string)))
-    (xp::write-string+ string stream start end)))
+    (xp::write-string+ string stream start end))
+  
+  #+#.(cl:if (cl:find-symbol "STREAM-FILE-POSITION" :gray-streams) '(cl:and) '(cl:or))
+  (defmethod gray-streams:stream-file-position
+      ((s trivial-gray-stream-mixin) &optional position)
+    (if position
+        (setf (stream-file-position s) position)
+        (stream-file-position s))))
 
 #+allegro
 (progn