[cells-cvs] CVS update: cell-cultures/ffi-extender/arrays.lisp cell-cultures/ffi-extender/callbacks.lisp cell-cultures/ffi-extender/definers.lisp cell-cultures/ffi-extender/ffi-extender.lpr
Kenny Tilton
ktilton at common-lisp.net
Sun Dec 5 04:51:00 UTC 2004
Update of /project/cells/cvsroot/cell-cultures/ffi-extender
In directory common-lisp.net:/tmp/cvs-serv7571/ffi-extender
Modified Files:
arrays.lisp callbacks.lisp definers.lisp ffi-extender.lpr
Log Message:
Cleaning up
Date: Sun Dec 5 05:50:56 2004
Author: ktilton
Index: cell-cultures/ffi-extender/arrays.lisp
diff -u cell-cultures/ffi-extender/arrays.lisp:1.3 cell-cultures/ffi-extender/arrays.lisp:1.4
--- cell-cultures/ffi-extender/arrays.lisp:1.3 Wed Nov 17 13:31:51 2004
+++ cell-cultures/ffi-extender/arrays.lisp Sun Dec 5 05:50:54 2004
@@ -20,18 +20,11 @@
;;; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
;;; IN THE SOFTWARE.
-(defpackage :ffi-extender
- (:nicknames :ffx)
- (:export
- #:ff-elt #:ff-list
- #:eltf #:eltd #:elti #:fgn-pa
- #:with-ff-array-elements
- #:make-ff-array
- #:make-floatv #:ff-floatv-ensure
- #:ffx-reset #:fgn-alloc #:fgn-free #:gllog #:glfree))
-(in-package :ffx)
+
+(in-package :ffx)
+
(defparameter *gl-rsrc* nil)
(defparameter *fgn-mem* nil)
@@ -188,4 +181,13 @@
(setf (ff-elt v :double n) (coerce value 'double-float)))
(defmacro fgn-pa (pa n)
- `(uffi:deref-array ,pa '(:array (* :void)) ,n))
\ No newline at end of file
+ `(uffi:deref-array ,pa '(:array (* :void)) ,n))
+
+(eval-when (compile load eval)
+ (export '(
+ ff-elt ff-list
+ eltf eltd elti fgn-pa
+ with-ff-array-elements
+ make-ff-array
+ make-floatv ff-floatv-ensure
+ ffx-reset fgn-alloc fgn-free gllog glfree)))
\ No newline at end of file
Index: cell-cultures/ffi-extender/callbacks.lisp
diff -u cell-cultures/ffi-extender/callbacks.lisp:1.2 cell-cultures/ffi-extender/callbacks.lisp:1.3
--- cell-cultures/ffi-extender/callbacks.lisp:1.2 Wed Nov 17 13:31:51 2004
+++ cell-cultures/ffi-extender/callbacks.lisp Sun Dec 5 05:50:54 2004
@@ -21,16 +21,6 @@
;;; IN THE SOFTWARE.
-(defpackage :ffi-extender
- (:nicknames :ffx)
- (:export
- #:ff-register-callable
- #:ff-defun-callable
- #:ff-def-call
- #:ff-pointer-address
- ))
-
-
(in-package :ffx)
(defun ff-register-callable (callback-name)
@@ -43,27 +33,23 @@
(defmacro ff-defun-callable (call-convention result-type name args &body body)
(declare (ignorable result-type))
-#+lispworks
- `(fli:define-foreign-callable
- (,(symbol-name name) :result-type ,result-type :calling-convention ,call-convention)
- (, at args)
- , at body)
-#+allegro
- `(ff:defun-foreign-callable ,name ,args
- (declare (:convention ,(ecase call-convention
- (:cdecl :c)
- (:stdcall :stdcall))))
- , at body))
-
-
-#+test ;; lw-sample
-(fli:define-foreign-callable
- ("square" :result-type :int)
- ((arg-1 :int)) (* arg-1 arg-1))
+ (let ((native-args (uffi::process-function-args args)))
+ #+lispworks
+ `(fli:define-foreign-callable
+ (,(symbol-name name) :result-type ,result-type :calling-convention ,call-convention)
+ (, at native-args)
+ , at body)
+ #+allegro
+ `(ff:defun-foreign-callable ,name ,native-args
+ (declare (:convention ,(ecase call-convention
+ (:cdecl :c)
+ (:stdcall :stdcall))))
+ , at body)))
+
#+test
-(ff-defun-callable :cdecl :int square ((arg-1 :int))
- (* arg-1 arg-1))
+(ff-defun-callable :cdecl :int square ((arg-1 :int)(data (* :void)))
+ (list data (* arg-1 arg-1)))
(defmacro ff-def-call ((module iname ename) args)
#+cormanlisp
@@ -87,3 +73,9 @@
:module ,module
:result-type :int))
+
+(eval-when (compile load eval)
+ (export '(ff-register-callable
+ ff-defun-callable
+ ff-def-call
+ ff-pointer-address)))
\ No newline at end of file
Index: cell-cultures/ffi-extender/definers.lisp
diff -u cell-cultures/ffi-extender/definers.lisp:1.1 cell-cultures/ffi-extender/definers.lisp:1.2
--- cell-cultures/ffi-extender/definers.lisp:1.1 Sat Jun 26 20:38:42 2004
+++ cell-cultures/ffi-extender/definers.lisp Sun Dec 5 05:50:55 2004
@@ -20,22 +20,25 @@
;;; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
;;; IN THE SOFTWARE.
-;; $Header: /project/cells/cvsroot/cell-cultures/ffi-extender/definers.lisp,v 1.1 2004/06/26 18:38:42 ktilton Exp $
+;; $Header: /project/cells/cvsroot/cell-cultures/ffi-extender/definers.lisp,v 1.2 2004/12/05 04:50:55 ktilton Exp $
+
-(defpackage :ffi-extender
- (:nicknames :ffx)
- (:export
-
- #:defun-ffx #:defun-ffx-multi
- #:dffr
- #:dfc
- #:dft
- #:dfenum
- #:make-ff-pointer
- #:ff-pointer-address
- ))
+(defpackage :ffi-extender
+ (:nicknames :ffx))
+(eval-when (compile load eval)
+ (export '(
+ defun-ffx defun-ffx-multi
+ dffr
+ dfc
+ dft
+ dfenum
+ make-ff-pointer
+ ff-pointer-address
+ )))
+
+
(in-package :ffx)
Index: cell-cultures/ffi-extender/ffi-extender.lpr
diff -u cell-cultures/ffi-extender/ffi-extender.lpr:1.1 cell-cultures/ffi-extender/ffi-extender.lpr:1.2
--- cell-cultures/ffi-extender/ffi-extender.lpr:1.1 Sat Jun 26 20:38:42 2004
+++ cell-cultures/ffi-extender/ffi-extender.lpr Sun Dec 5 05:50:55 2004
@@ -1,4 +1,4 @@
-;; -*- lisp-version: "6.2 [Windows] (Jun 26, 2002 11:39)"; common-graphics: "1.389.2.105.2.14"; -*-
+;; -*- lisp-version: "6.2 [Windows] (Sep 3, 2004 12:04)"; common-graphics: "1.389.2.105.2.14"; -*-
(in-package :common-graphics-user)
@@ -9,7 +9,8 @@
:modules (list (make-instance 'module :name "definers.lisp")
(make-instance 'module :name "callbacks.lisp")
(make-instance 'module :name "arrays.lisp"))
- :projects nil
+ :projects (list (make-instance 'project-module :name
+ "c:\\000000\\uffi\\uffi"))
:libraries nil
:distributed-files nil
:project-package-name :ffi-extender
More information about the Cells-cvs
mailing list