r1584: *** empty log message ***
[uffi.git] / src / objects.cl
index 0f28115a0cbd24565ad81b915475212994923d77..01884302c2679606db6e7af3a7592f0ef8459cce 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Feb 2002
 ;;;;
-;;;; $Id: objects.cl,v 1.6 2002/03/17 17:33:30 kevin Exp $
+;;;; $Id: objects.cl,v 1.7 2002/03/18 02:27:28 kevin Exp $
 ;;;;
 ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
   #+allegro
   obj
   )
+
+(defmacro allocate-byte-array (nsize)
+  #+cmu
+  `(alien:make-alien (alien:unsigned 8) ,nsize)
+  #+lispworks
+  `(fli:allocate-foreign-object :type :byte :nelems ,nsize)
+  #+allegro
+  `(ff:allocate-fobject (array :byte ,nsize))
+)
+
+(defmacro deref-byte-array (array position)
+  #+cmu `(alien:deref ,array ,position)
+  #+lispworks `(fli:dereference ,array :index ,position)
+  #+allegro `(ff:fslot-value-typed '(:array :byte) :c ,array ,position)
+)
+
+
+
+
+)