Added more documentation (for tinaa)
Tue Sep 5 23:19:45 PDT 2006 Daniel Dickison (danieldickison@gmail.com)
* Added more documentation (for tinaa)
diff -rN -u old-c2ffi/CFFI-Generator.lisp new-c2ffi/CFFI-Generator.lisp
--- old-c2ffi/CFFI-Generator.lisp 2014-07-28 03:19:17.000000000 -0700
+++ new-c2ffi/CFFI-Generator.lisp 2014-07-28 03:19:17.000000000 -0700
@@ -3,7 +3,9 @@
(export '(cffi-generator))
(defclass cffi-generator (ffi-generator)
- ())
+ ()
+ (:default-initargs :name "CFFI")
+ (:documentation "This class generates bindings for CFFI."))
(defmethod sort-bindings ((ffi cffi-generator))
(setf (slot-value ffi 'bindings)
diff -rN -u old-c2ffi/FFI-Generator.lisp new-c2ffi/FFI-Generator.lisp
--- old-c2ffi/FFI-Generator.lisp 2014-07-28 03:19:17.000000000 -0700
+++ new-c2ffi/FFI-Generator.lisp 2014-07-28 03:19:17.000000000 -0700
@@ -19,10 +19,12 @@
:documentation "The type of FFI, used for creating the output path.")
(xml-file :initarg :xml-file
:initform nil
- :accessor ffi-xml-file)
+ :accessor ffi-xml-file
+ :documentation "The input file generated by GCC-XML.")
(output-file :initarg :output-file
:initform nil
- :accessor ffi-output-file)
+ :accessor ffi-output-file
+ :documentation "The output file, which will be computed from the xml-file name if nil.")
(parse-tree :type list
:initarg :parse-tree
:initform nil
@@ -32,7 +34,9 @@
(type-mappings :initform (make-hash-table :test #'equal)
:reader ffi-type-mappings)
(bindings :type list :initform nil
- :reader ffi-bindings)))
+ :reader ffi-bindings
+ :documentation "Holds a list of FFI binding forms after calling generate-bindings."))
+ (:documentation "This class encapsulates the generation of FFI bindings from XML files generated by GCC-XML."))
(defmethod ffi-output-file ((ffi ffi-generator))
"Override the accessor getter for output-file to return a value computed from xml-file if this slot is not explicitly set."
@@ -269,6 +273,7 @@
;;;;; Utility ;;;;;
(defun str->sym (str &optional (package *package*))
+ "Generates a Lisp name in the form of a symbol from a given C-style name by replacing underscores with dashes, uppercasing, then interning the symbol."
(intern (string-upcase (string-replace (string str) "_" "-"))
package))
diff -rN -u old-c2ffi/c2ffi.asd new-c2ffi/c2ffi.asd
--- old-c2ffi/c2ffi.asd 2014-07-28 03:19:17.000000000 -0700
+++ new-c2ffi/c2ffi.asd 2014-07-28 03:19:17.000000000 -0700
@@ -1,6 +1,6 @@
(defsystem "c2ffi"
- :author "Daniel Dickison (danieldickison@gmail.com)"
- :version "0.1"
+ :author "Daniel Dickison <danieldickison@gmail.com>"
+ :version "0.2"
:depends-on ("xmls" "cl-utilities" "iterate" "anaphora")
:components ((:file "Package")
(:file "String-Utilities"
diff -rN -u old-c2ffi/c2ffi.lisp new-c2ffi/c2ffi.lisp
--- old-c2ffi/c2ffi.lisp 2014-07-28 03:19:17.000000000 -0700
+++ new-c2ffi/c2ffi.lisp 2014-07-28 03:19:17.000000000 -0700
@@ -53,6 +53,7 @@
(write-bindings generator :in-package in-package))))
(defun eval-bindings (defs)
+ "Simply evaluates a list of forms."
(eval (cons 'progn defs)))