r1636: Updated/cleaned def-array to def-array-pointer
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 23 Mar 2002 12:58:12 +0000 (12:58 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 23 Mar 2002 12:58:12 +0000 (12:58 +0000)
ChangeLog
TODO
doc/ref.sgml
src/aggregates.cl
src/strings.cl

index c2fe7311ec4502b5d52efbbc180011428b9d8da5..0260b37b58a6ca2acde378d7af4bb9963f68c344 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,12 @@
-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
 21 Mar 2002
        * Fixed problem with NULL foreign-strings with CMUCL
        * Added c-test-fns to examples for allow more specific testing
diff --git a/TODO b/TODO
index fb4f2c85783f74658da29f61457f8596956dbc0c..389df1dad53dd518f7dadce107972fd9be883d02 100644 (file)
--- a/TODO
+++ b/TODO
@@ -5,7 +5,5 @@ passing a quote character in front of non-keyword types. So
 This may involve stripping the (quote ...) for some implementations
 like CMUCL which doesn't evaluate the type argument.
 
 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.
 - Split implementation-dependent code into separate files in preparation
 for MCL and CormanLisp ports.
index 58ac773cac341a8ec6f7a275f640b487a902f1f6..fcb08ebf8af2ca1e2e2e45629fcfe73eee1a7eef 100644 (file)
@@ -315,7 +315,7 @@ abstracts the difference in implementations where some return a
       <refsect1>
        <title>Examples</title>
        <programlisting>
       <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))))
 (let ((fs (convert-to-foreign-string "ab")))
    (values (null-char-p (deref-array fs 'ca 0))
            (null-char-p (deref-array fs 'ca 2))))
@@ -640,17 +640,17 @@ structure. It's type is <constant>:pointer-self</constant>.
     </refentry>
 
 
     </refentry>
 
 
-    <refentry id="def-array">
+    <refentry id="def-array-pointer">
       <refnamediv>
       <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>
        </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>
        </synopsis>
       </refsynopsisdiv>
       <refsect1>
@@ -675,13 +675,13 @@ structure. It's type is <constant>:pointer-self</constant>.
       <refsect1>
        <title>Description</title>
        <para>
       <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>
        </para>
       </refsect1>
       <refsect1>
        <title>Examples</title>
        <programlisting>
-(def-array byte-array :unsigned-char)
+(def-array-pointer byte-array-pointer :unsigned-char)
        </programlisting>
       </refsect1>
       <refsect1>
        </programlisting>
       </refsect1>
       <refsect1>
index 06dca81fe691b5fde374bc25abecf846db839c5e..3fc32a34f093a2096ae06ce2779f5b4c778e42a6 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Feb 2002
 ;;;;
 ;;;; 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
 ;;;;
 ;;;;
 ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
@@ -49,16 +49,16 @@ of the enum-name name, separator-string, and field-name"
     cmds))
 
 
     cmds))
 
 
-(defmacro def-array (name-array type)
+(defmacro def-array-pointer (name-array type)
   #+allegro
   `(ff:def-foreign-type ,name-array 
   #+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
   #+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 
   #+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)
   )
 
 (defun process-struct-fields (name fields)
index 75496e08a3c77a1069e774bea0155d641e6f73d0..18b7ffa88e0d44a17f3435bbba66d29775372640 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Feb 2002
 ;;;;
 ;;;; 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
 ;;;;
 ;;;;
 ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
@@ -159,9 +159,6 @@ that LW/CMU automatically converts strings from c-calls."
       ,result)))
 
 
       ,result)))
 
 
-
-
-
 ;; Modified from CMUCL's source to handle non-null terminated strings
 #+cmu
 (defun cmucl-naturalize-cstring (sap &key 
 ;; Modified from CMUCL's source to handle non-null terminated strings
 #+cmu
 (defun cmucl-naturalize-cstring (sap &key