Custom Query (1030 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (913 - 915 of 1030)

Ticket Resolution Summary Owner Reporter
#877 invalid sticky default-initargs Martin Brooks
Description

Redefining a class does not work properly when the first def contains :default-initargs, but the second def does not. What happens is that use of the second def still has the default initiarg.

? (defclass foo () ((x :accessor x :initarg :x)) (:default-initargs :x 2))

? (describe (make-instance 'foo))

#<FOO #x302093A3C44D>
Class: #<STANDARD-CLASS FOO>
Wrapper: #<CCL::CLASS-WRAPPER FOO #x302093A3E25D>
Instance slots
X: 2

? (defclass foo () ((x :accessor x :initarg :x)))

? (describe (make-instance 'foo))

#<FOO #x302093A3C44D>
Class: #<STANDARD-CLASS FOO>
Wrapper: #<CCL::CLASS-WRAPPER FOO #x302093A3E25D>
Instance slots
X: 2
#911 fixed thread crash in callback from Grand Central Dispatch Martin Brooks
Description

Using cl-dispatch, I perform the elementary operation of adding a callback function to the asynchronous dispatch queue. See code below. Thread crash results when testing by repeated execution, typically after tens of executions. The error details are slightly different each time, and occasionally I am thrown into the kernel debugger. I have attached the OS X (10.7) crash report for one crash.

(load "lisp:quicklisp;setup")
(ql:quickload "dispatch")

(defcallback foo (:address x) (declare (ignore x)) )

(defun test (v)
  (let ((q (#_dispatch_get_global_queue 0 0))) 
    (dotimes (i v)
        (print i) 
       (#_dispatch_async_f q (%null-ptr) foo))))

(test 100)   ; this never completes without an error.
#1064 fixed reduce maphash consing Martin Brooks
Description

with-hash-table-iterator in file macros.lisp results in what appears to be unnecessary consing.

Consing is reduced by adding ,state to the list of dynamic-extent declarations, as shown below.

(defmacro with-hash-table-iterator ((mname hash-table) &body body)

"WITH-HASH-TABLE-ITERATOR ((function hash-table) &body body)

provides a method of manually looping over the elements of a hash-table. FUNCTION is bound to a generator-macro that, within the scope of the invocation, returns one or three values. The first value tells whether any objects remain in the hash table. When the first value is non-NIL, the second and third values are the key and the value of the next object."

(let* ((hash (gensym))

(keys (gensym)) (values (gensym)) (count (gensym)) (state (gensym)))

`(let* ((,hash ,hash-table)

(,count (hash-table-count ,hash)) (,keys (make-array ,count)) (,values (make-array ,count)) (,state (vector ,hash 0 ,keys ,values (enumerate-hash-keys-and-values ,hash ,keys ,values))))

(declare (dynamic-extent ,keys ,values ,state)

(fixnum ,count))

(macrolet ((,mname () `(next-hash-table-iteration-1 ,',state)))

,@body))))

Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.