Re: ACL Port

Karsten Poeck <[email protected]> Tue, 03 Oct 2006 21:18:16 +0200
Newsgroups gmane.lisp.cl-http
Message-ID <[email protected]>
Hello John,
the acl port is more or less up again, but before I commit my updates 
I would like to clarify one doubt I have.

I noted a crash in get-pathname-data-cache when called with a pathname.
This is not so surprinsing, since this function calls get-value and get-value
is define for property-list-mixin and a pathname object clearly does 
not inherit from property-list-mixin.

All this is now called via export-url.

It seems that the code for data-cache.lisp did not change in ages, 
but perhaps was not used.

In the end I had to define get-value for pathname objects as in the 
attached file.

Is this the right way to go?

salu2

Karsten



No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.407 / Virus Database: 268.12.12/461 - Release Date: 02/10/2006

_______________________________________________
WWW-CL mailing list
[email protected]
https://lists.csail.mit.edu/mailman/listinfo/www-cl
patch-get-value.lisp (text/plain, 587 B)
(in-package :http)

(defvar %plist-table (make-hash-table :test 'equal))

(defmethod get-value ((pathname pathname) indicator &optional default)
  (let ((was (gethash pathname %plist-table )))
    (cond (was (getf was indicator default))
          (t default))))

(defmethod (setf get-value) (value (pathname pathname) indicator &optional default)
  (declare (ignore default))
  (let ((was (gethash pathname %plist-table )))
    (cond ((null was) (setf (gethash pathname %plist-table)
                        (list indicator value)))
          (t (setf (getf was indicator) value)))))