chiark / gitweb /
Fixed a bug in the translation of lists to GLists
authorespen <espen>
Tue, 15 Aug 2000 23:25:18 +0000 (23:25 +0000)
committerespen <espen>
Tue, 15 Aug 2000 23:25:18 +0000 (23:25 +0000)
glib/glib.lisp

index fdb38518c46601a020d351146b44f22e4493ef91..891196a0a3c880979031fba524862adfd12857af 100644 (file)
@@ -15,7 +15,7 @@
 ;; License along with this library; if not, write to the Free Software
 ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
-;; $Id: glib.lisp,v 1.1 2000-08-14 16:44:31 espen Exp $
+;; $Id: glib.lisp,v 1.2 2000-08-15 23:25:18 espen Exp $
 
 
 (in-package "GLIB")
@@ -83,7 +83,7 @@ (deftype-method translate-to-alien double-list (type-spec list &optional copy)
         (to-alien (translate-to-alien element-type-spec 'element t)))
     `(let ((glist (make-pointer 0))) 
        (dolist (element ,list glist)
-        (setq glist (glist-append glist ,to-alien element-type-spec))))))
+        (setq glist (glist-append glist ,to-alien ,element-type-spec))))))
 
 (deftype-method
     translate-from-alien
@@ -110,7 +110,8 @@ (deftype-method cleanup-alien double-list (type-spec glist &optional copied)
         ,(when (eq alien-type-spec 'system-area-pointer)
            `(do ((tmp glist (glist-next tmp)))
                 ((null-pointer-p tmp))
-              ,(cleanup-alien element-type-spec '(glist-data tmp) t)))
+              ,(cleanup-alien
+                element-type-spec `(glist-data tmp ,element-type-spec) t)))
         (glist-free glist)))))