Patch: Bad type declarations in text.lisp

Daniel Barlow <[email protected]> Sat, 19 Jul 2003 17:33:20 +0100
Newsgroups gmane.lisp.clx.devel
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


- --- text.lisp   3 Apr 2003 12:27:15 -0000       1.3
+++ text.lisp   19 Jul 2003 12:34:14 -0000
@@ -268,7 +268,7 @@
 
 (defun text-extents-server (font string start end)
   (declare (type font font)
- -          (type string string)
+          (type sequence string)
           (type array-index start end))
   (declare (clx-values width ascent descent left right font-ascent font-descent direction))
   (let ((display (font-display font))
@@ -295,7 +295,7 @@
 
 (defun text-width-server (font string start end)
   (declare (type (or font gcontext) font)
- -          (type string string)
+          (type sequence string)
           (type array-index start end))
   (declare (clx-values integer))
   (let ((display (font-display font))


Each of these functions is called in only one place, with an argument
that according to its declaration is buffer-text16, and according to
SBCL type inference is (SIMPLE-ARRAY (UNSIGNED-BYTE 16) (256)).
I think 'sequence' is a reasonable declaration - any operation
involving a server roundtrip is unlikely to be limited by the speed of
generic(sic) sequence accessors anyway.


- -dan

- -- 

   http://www.cliki.net/ - Link farm for free CL-on-Unix resources 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE/GXLdHDK5ZnWQiRMRAoYfAKCC+vOhpX8Ao1i8BOQNRqUNjhcLfQCfVIzz
5QNVj5nD3L1RzfiDVZ/7BoE=
=qh/+
-----END PGP SIGNATURE-----