Custom Query (1030 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (397 - 399 of 1030)

Ticket Resolution Summary Owner Reporter
#641 fixed DEFSTRUCT (:TYPE) + DEFTYPE results in bogus duplicate-type-definition warning Gary Byers Tobias C. Rittweiler
Description

Straight from CLHS DEFSTRUCT dictionary entry (the description of the :TYPE option):

;; For example:

(defstruct (quux (:type list) :named) x y)

;; should make a constructor that builds a list exactly like the one ;; that list produces, with quux as its car.

;; If this type is defined:

(deftype quux () '(satisfies quux-p))

;; then this form

(typep (make-quux) 'quux)

;; should return precisely what this one does

(typep (list 'quux nil nil) 'quux)

Compiling that, results in

;Compiling "/tmp/foo.lisp"... ;Compiler warnings for "/tmp/foo.lisp" : ; In an anonymous lambda form at position 60: Duplicate definitions of (TYPE QUUX), in this file ; In an anonymous lambda form at position 449: Duplicate definitions of (TYPE FOO), in this file

The Ironclad library makes use of this feature. So it's a real-life annoyance.

#643 fixed attachment test Gary Byers R. Matthew Emerson
Description

testing attachments

#645 fixed stream-read-ivector fails for non-byte ivectors Gary Byers Alexander Gavrilov
Description

This function is documented as accepting any ivector. However the actual behavior is quite different:

? (defvar arr (make-array 5 :element-type 'single-float))
ARR
? (with-open-file (s "/dev/zero" :direction :input :element-type '(unsigned-byte 8))
    (stream-read-ivector s arr 0 20))
> Error: 0 doesn't match array element type of #<VECTOR 5 type SINGLE-FLOAT, simple>.
> While executing: CCL::%IOBLOCK-BINARY-IN-IVECT, in process listener(1).

This is fixed by the following change, but it is obviously a very ugly hack that depends on the implementation details of the read function:

--- l1-streams.lisp     (revision 13365)                           
+++ l1-streams.lisp     (working copy)                             
@@ -2471,10 +2471,10 @@                                            
     (let* ((b (funcall rbf ioblock)))                             
       (if (eq b :eof)                                             
        (return (- i start)))                                      
-      (setf (uvref vector i) b)                                   
-      (incf i)                                                    
-      (decf need)                                                 
-      (let* ((idx (io-buffer-idx in))                             
+   ;   (setf (uvref vector i) b)                                  
+   ;   (incf i)                                                   
+   ;   (decf need)                                                
+      (let* ((idx (1- (io-buffer-idx in)))                        
             (count (io-buffer-count in))                          
             (avail (- count idx)))                                
        (declare (fixnum idx count avail))
Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.