Updated for gtk+-2.4
[clg] / glib / glib.lisp
index 5ed1414..1827205 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.10 2001-05-11 16:00:33 espen Exp $
+;; $Id: glib.lisp,v 1.14 2004-10-31 11:37:11 espen Exp $
 
 
 (in-package "GLIB")
   (address pointer)
   (size unsigned-long))
 
-;(defbinding (deallocate-memory "g_free") () nil
-;  (address pointer))
-(defun deallocate-memory (address)
-  (declare (ignore address)))
+(defbinding (deallocate-memory "g_free") () nil
+  (address pointer))
+;(defun deallocate-memory (address)
+;  (declare (ignore address)))
 
 (defun copy-memory (from length &optional (to (allocate-memory length)))
   (kernel:system-area-copy from 0 to 0 (* 8 length))
         (dotimes (i ,length)
           (setf
            (aref vector i)
-           ,(translate-to-alien
+           ,(translate-from-alien
              element-type
              `(,(sap-ref-fname element-type) c-array (* i ,element-size))
              weak-ref)))
                  `(dotimes (i ,length)
                     (unreference-alien
                      element-type (sap-ref-sap c-vector (* i ,element-size))))
-               `(do ((offset 0 (+ offset ,element-size))
+               `(do ((offset 0 (+ offset ,element-size)))
                      ((sap=
                        (sap-ref-sap c-vector offset)
-                       *magic-end-of-array*)))
+                       *magic-end-of-array*))
                     ,(unreference-alien
                       element-type '(sap-ref-sap c-vector offset))))))
         (deallocate-memory c-vector)))))
           (elt sequence i)
           (funcall function (funcall reader location (* i size)))))
        sequence)))))
-     
\ No newline at end of file