Przeglądaj źródła

Commit ECL patch submitted by Geo Carncross

hhubner 17 lat temu
rodzic
commit
6be5274f3a
2 zmienionych plików z 15 dodań i 1 usunięć
  1. 9 0
      mixin.lisp
  2. 6 1
      package.lisp

+ 9 - 0
mixin.lisp

@@ -115,3 +115,12 @@
   ;; SBCL extension:
   (defmethod sb-gray:stream-line-length ((stream trivial-gray-stream-mixin))
     80))
+
+#+ecl
+(progn
+  (defmethod gray:stream-read-sequence
+    ((s trivial-gray-stream-mixin) seq &optional start end)
+    (stream-read-sequence s seq (or start 0) (or end (length seq))))
+  (defmethod gray:stream-write-sequence
+    ((s trivial-gray-stream-mixin) seq &optional start end)
+    (stream-write-sequence s seq (or start 0) (or end (length seq)))))

+ 6 - 1
package.lisp

@@ -9,6 +9,10 @@
   (unless (fboundp 'stream:stream-write-string)
     (require "streamc.fasl")))
 
+#+ecl
+(eval-when (:compile-toplevel :load-toplevel :execute)
+  (gray::redefine-cl-functions))
+
 (macrolet
     ((frob ()
        (let
@@ -34,7 +38,8 @@
 			  #+clisp :gray
 			  #+openmcl :ccl
 			  #+lispworks :stream
-			  #-(or sbcl allegro cmu clisp openmcl lispworks) ...
+			  #+ecl :gray
+			  #-(or sbcl allegro cmu clisp openmcl lispworks ecl) ...
 			  ,@common-symbols)
 	    (:export #:trivial-gray-stream-mixin
 		     #:stream-read-sequence