-See TODO file -- actively maintained. Includes changes that you
- might expect in the interface.
+2002-03-22 Kevin Rosenberg (kevin@rosenberg.net)
+ * src/aggregates.cl:
+ Changed name and implementation of def-array to more appropriate
+ def-array-pointer
+
+ * src/ref.sgml:
+ Updated def-array-pointer documentation
+
21 Mar 2002
* Fixed problem with NULL foreign-strings with CMUCL
* Added c-test-fns to examples for allow more specific testing
This may involve stripping the (quote ...) for some implementations
like CMUCL which doesn't evaluate the type argument.
-- Cleanup the meaning of (def-array). Add size parameter
-
- Split implementation-dependent code into separate files in preparation
for MCL and CormanLisp ports.
<refsect1>
<title>Examples</title>
<programlisting>
-(def-array ca :char)
+(def-array-pointer ca :unsigned-char)
(let ((fs (convert-to-foreign-string "ab")))
(values (null-char-p (deref-array fs 'ca 0))
(null-char-p (deref-array fs 'ca 2))))
</refentry>
- <refentry id="def-array">
+ <refentry id="def-array-pointer">
<refnamediv>
- <refname>def-array</refname>
- <refpurpose>Defines a foreign array type.
+ <refname>def-array-pointer</refname>
+ <refpurpose>Defines a pointer to a array of type.
</refpurpose>
<refclass>Macro</refclass>
</refnamediv>
<refsynopsisdiv>
<title>Syntax</title>
<synopsis>
- <function>def-array</function> <replaceable>name type</replaceable>
+ <function>def-array-pointer</function> <replaceable>name type</replaceable>
</synopsis>
</refsynopsisdiv>
<refsect1>
<refsect1>
<title>Description</title>
<para>
- Defines a foreign array type.
+ Defines a type tat is a pointer to an array of type.
</para>
</refsect1>
<refsect1>
<title>Examples</title>
<programlisting>
-(def-array byte-array :unsigned-char)
+(def-array-pointer byte-array-pointer :unsigned-char)
</programlisting>
</refsect1>
<refsect1>
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Feb 2002
;;;;
-;;;; $Id: aggregates.cl,v 1.7 2002/03/21 07:56:45 kevin Exp $
+;;;; $Id: aggregates.cl,v 1.8 2002/03/23 12:58:12 kevin Exp $
;;;;
;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
cmds))
-(defmacro def-array (name-array type)
+(defmacro def-array-pointer (name-array type)
#+allegro
`(ff:def-foreign-type ,name-array
- (:array ,(convert-from-uffi-type type :array)))
+ (:array ,(convert-from-uffi-type type :array)))
#+lispworks
`(fli:define-c-typedef ,name-array
- (:pointer (:pointer ,(convert-from-uffi-type type :array))))
+ (:c-array ,(convert-from-uffi-type type :array)))
#+cmu
`(alien:def-alien-type ,name-array
- (* ,(convert-from-uffi-type type :array)))
+ (* ,(convert-from-uffi-type type :array)))
)
(defun process-struct-fields (name fields)
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Feb 2002
;;;;
-;;;; $Id: strings.cl,v 1.12 2002/03/22 20:51:08 kevin Exp $
+;;;; $Id: strings.cl,v 1.13 2002/03/23 12:58:12 kevin Exp $
;;;;
;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
,result)))
-
-
-
;; Modified from CMUCL's source to handle non-null terminated strings
#+cmu
(defun cmucl-naturalize-cstring (sap &key