[rdnzl-cvs] CVS RDNZL
eweitz
eweitz at common-lisp.net
Sat Feb 18 22:26:12 UTC 2006
Update of /project/rdnzl/cvsroot/RDNZL
In directory common-lisp:/tmp/cvs-serv27157
Modified Files:
CHANGELOG.txt adapter.lisp arrays.lisp container.lisp
direct.lisp ffi.lisp import.lisp load.lisp packages.lisp
port-acl.lisp port-ccl.lisp port-clisp.lisp port-lw.lisp
port-sbcl.lisp rdnzl.asd reader.lisp specials.lisp util.lisp
Log Message:
sync with 0.9.4
--- /project/rdnzl/cvsroot/RDNZL/CHANGELOG.txt 2006/02/01 12:02:21 1.6
+++ /project/rdnzl/cvsroot/RDNZL/CHANGELOG.txt 2006/02/18 22:26:12 1.7
@@ -1,3 +1,15 @@
+Version 0.9.4
+2006-02-18
+Fixed LW SINGLE-FLOAT issues (detective work by Dan Muller)
+
+Version 0.9.3
+2006-02-17
+Added *COERCE-DOUBLE-FLOATS-TO-SINGLE*
+
+Version 0.9.2
+2006-02-13
+One can now call static methods from specific assemblies (thanks to Jim Sokoloff)
+
Version 0.9.1
2006-02-01
Added missing WIDE-CHAR support for SBCL/Win32
--- /project/rdnzl/cvsroot/RDNZL/adapter.lisp 2006/02/01 12:02:21 1.4
+++ /project/rdnzl/cvsroot/RDNZL/adapter.lisp 2006/02/18 22:26:12 1.5
@@ -1,5 +1,5 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: RDNZL; Base: 10 -*-
-;;; $Header: /project/rdnzl/cvsroot/RDNZL/adapter.lisp,v 1.4 2006/02/01 12:02:21 eweitz Exp $
+;;; $Header: /project/rdnzl/cvsroot/RDNZL/adapter.lisp,v 1.5 2006/02/18 22:26:12 eweitz Exp $
;;; Copyright (c) 2004-2006, Dr. Edmund Weitz. All rights reserved.
--- /project/rdnzl/cvsroot/RDNZL/arrays.lisp 2006/02/01 12:02:21 1.4
+++ /project/rdnzl/cvsroot/RDNZL/arrays.lisp 2006/02/18 22:26:12 1.5
@@ -1,5 +1,5 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: RDNZL; Base: 10 -*-
-;;; $Header: /project/rdnzl/cvsroot/RDNZL/arrays.lisp,v 1.4 2006/02/01 12:02:21 eweitz Exp $
+;;; $Header: /project/rdnzl/cvsroot/RDNZL/arrays.lisp,v 1.5 2006/02/18 22:26:12 eweitz Exp $
;;; Copyright (c) 2004-2006, Dr. Edmund Weitz. All rights reserved.
--- /project/rdnzl/cvsroot/RDNZL/container.lisp 2006/02/01 12:02:21 1.4
+++ /project/rdnzl/cvsroot/RDNZL/container.lisp 2006/02/18 22:26:12 1.5
@@ -1,5 +1,5 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: RDNZL; Base: 10 -*-
-;;; $Header: /project/rdnzl/cvsroot/RDNZL/container.lisp,v 1.4 2006/02/01 12:02:21 eweitz Exp $
+;;; $Header: /project/rdnzl/cvsroot/RDNZL/container.lisp,v 1.5 2006/02/18 22:26:12 eweitz Exp $
;;; Copyright (c) 2004-2006, Dr. Edmund Weitz. All rights reserved.
@@ -193,7 +193,10 @@
(character
(%make-dot-net-container-from-char object))
(double-float
- (%make-dot-net-container-from-double object))
+ (cond (*coerce-double-floats-to-single*
+ (%make-dot-net-container-from-float object))
+ (t
+ (%make-dot-net-container-from-double object))))
(float
(%make-dot-net-container-from-float object))
(pathname
@@ -299,16 +302,26 @@
,name
,args))))))
+(defun make-type-from-assembly-and-name (assembly name)
+ "Returns the .NET type with the name NAME from a specific assembly."
+ (ffi-call-with-args %invoke-instance-member
+ assembly "GetType" (list name)))
+
;; generic functions and TYPECASE are avoided below to make delivered
;; images smaller
(defun invoke (object method-name &rest args)
- "Invokes the method named METHOD-NAME \(a string). If OBJECT is a
-CONTAINER then the method is supposed to be an instance method of this
-object. If OBJECT is a string then the method is supposed to be a
-static method of the type named OBJECT. ARGS (either CONTAINER
-structures or Lisp objects which can be converted) are the arguments
-to this method."
+ "Invokes the method named METHOD-NAME \(a string). If OBJECT
+is a CONTAINER then the method is supposed to be an instance
+method of this object. If OBJECT is a string then the method is
+supposed to be a static method of the type named OBJECT which
+will be looked up using System.Type::GetType. Otherwise, OBJECT
+should be a two-element list where the first element is a
+CONTAINER representing an assembly and the second element is a
+string denoting a static method \(which will be looked up in that
+specific assembly). ARGS (either CONTAINER structures or Lisp
+objects which can be converted) are the arguments to this
+method."
(let ((result
(cond ((container-p object)
(ffi-call-with-args %invoke-instance-member
@@ -320,6 +333,13 @@
(make-type-from-name (resolve-type-name object))
method-name
args))
+ ((and (consp object)
+ (container-p (car object))
+ (stringp (cdr object)))
+ (ffi-call-with-args %invoke-static-member
+ (make-type-from-assembly-and-name (car object) (cdr object))
+ method-name
+ args))
(t (error "Don't know how to invoke ~A on ~S." method-name object)))))
;; if some of the arguments were pass-by-reference reset them to
;; their underlying types
--- /project/rdnzl/cvsroot/RDNZL/direct.lisp 2006/02/01 12:02:21 1.4
+++ /project/rdnzl/cvsroot/RDNZL/direct.lisp 2006/02/18 22:26:12 1.5
@@ -1,5 +1,5 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: RDNZL; Base: 10 -*-
-;;; $Header: /project/rdnzl/cvsroot/RDNZL/direct.lisp,v 1.4 2006/02/01 12:02:21 eweitz Exp $
+;;; $Header: /project/rdnzl/cvsroot/RDNZL/direct.lisp,v 1.5 2006/02/18 22:26:12 eweitz Exp $
;;; Copyright (c) 2004-2006, Dr. Edmund Weitz. All rights reserved.
--- /project/rdnzl/cvsroot/RDNZL/ffi.lisp 2006/02/01 12:02:21 1.5
+++ /project/rdnzl/cvsroot/RDNZL/ffi.lisp 2006/02/18 22:26:12 1.6
@@ -1,5 +1,5 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: RDNZL; Base: 10 -*-
-;;; $Header: /project/rdnzl/cvsroot/RDNZL/ffi.lisp,v 1.5 2006/02/01 12:02:21 eweitz Exp $
+;;; $Header: /project/rdnzl/cvsroot/RDNZL/ffi.lisp,v 1.6 2006/02/18 22:26:12 eweitz Exp $
;;; Copyright (c) 2004-2006, Dr. Edmund Weitz. All rights reserved.
--- /project/rdnzl/cvsroot/RDNZL/import.lisp 2006/02/01 12:02:21 1.4
+++ /project/rdnzl/cvsroot/RDNZL/import.lisp 2006/02/18 22:26:12 1.5
@@ -1,5 +1,5 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: RDNZL; Base: 10 -*-
-;;; $Header: /project/rdnzl/cvsroot/RDNZL/import.lisp,v 1.4 2006/02/01 12:02:21 eweitz Exp $
+;;; $Header: /project/rdnzl/cvsroot/RDNZL/import.lisp,v 1.5 2006/02/18 22:26:12 eweitz Exp $
;;; Copyright (c) 2004-2006, Dr. Edmund Weitz. All rights reserved.
--- /project/rdnzl/cvsroot/RDNZL/load.lisp 2006/02/01 12:02:21 1.4
+++ /project/rdnzl/cvsroot/RDNZL/load.lisp 2006/02/18 22:26:12 1.5
@@ -1,5 +1,5 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
-;;; $Header: /project/rdnzl/cvsroot/RDNZL/load.lisp,v 1.4 2006/02/01 12:02:21 eweitz Exp $
+;;; $Header: /project/rdnzl/cvsroot/RDNZL/load.lisp,v 1.5 2006/02/18 22:26:12 eweitz Exp $
;;; Copyright (c) 2004-2006, Dr. Edmund Weitz. All rights reserved.
--- /project/rdnzl/cvsroot/RDNZL/packages.lisp 2006/02/01 12:02:21 1.4
+++ /project/rdnzl/cvsroot/RDNZL/packages.lisp 2006/02/18 22:26:12 1.5
@@ -1,5 +1,5 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
-;;; $Header: /project/rdnzl/cvsroot/RDNZL/packages.lisp,v 1.4 2006/02/01 12:02:21 eweitz Exp $
+;;; $Header: /project/rdnzl/cvsroot/RDNZL/packages.lisp,v 1.5 2006/02/18 22:26:12 eweitz Exp $
;;; Copyright (c) 2004-2006, Dr. Edmund Weitz. All rights reserved.
@@ -35,7 +35,8 @@
(defpackage :rdnzl
(:use :cl)
#+:sbcl (:shadow :defconstant)
- (:export :aref*
+ (:export :*coerce-double-floats-to-single*
+ :aref*
:box
:cast
:container-p
--- /project/rdnzl/cvsroot/RDNZL/port-acl.lisp 2006/02/01 12:02:21 1.4
+++ /project/rdnzl/cvsroot/RDNZL/port-acl.lisp 2006/02/18 22:26:12 1.5
@@ -1,5 +1,5 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: RDNZL; Base: 10 -*-
-;;; $Header: /project/rdnzl/cvsroot/RDNZL/port-acl.lisp,v 1.4 2006/02/01 12:02:21 eweitz Exp $
+;;; $Header: /project/rdnzl/cvsroot/RDNZL/port-acl.lisp,v 1.5 2006/02/18 22:26:12 eweitz Exp $
;;; Copyright (c) 2004-2006, Charles A. Cox, Dr. Edmund Weitz. All rights reserved.
--- /project/rdnzl/cvsroot/RDNZL/port-ccl.lisp 2006/02/01 12:02:21 1.4
+++ /project/rdnzl/cvsroot/RDNZL/port-ccl.lisp 2006/02/18 22:26:12 1.5
@@ -1,5 +1,5 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: RDNZL; Base: 10 -*-
-;;; $Header: /project/rdnzl/cvsroot/RDNZL/port-ccl.lisp,v 1.4 2006/02/01 12:02:21 eweitz Exp $
+;;; $Header: /project/rdnzl/cvsroot/RDNZL/port-ccl.lisp,v 1.5 2006/02/18 22:26:12 eweitz Exp $
;;; Copyright (c) 2004-2006, Dr. Edmund Weitz. All rights reserved.
--- /project/rdnzl/cvsroot/RDNZL/port-clisp.lisp 2006/02/01 12:02:21 1.4
+++ /project/rdnzl/cvsroot/RDNZL/port-clisp.lisp 2006/02/18 22:26:12 1.5
@@ -1,5 +1,5 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: RDNZL; Base: 10 -*-
-;;; $Header: /project/rdnzl/cvsroot/RDNZL/port-clisp.lisp,v 1.4 2006/02/01 12:02:21 eweitz Exp $
+;;; $Header: /project/rdnzl/cvsroot/RDNZL/port-clisp.lisp,v 1.5 2006/02/18 22:26:12 eweitz Exp $
;;; Copyright (c) 2004-2006, Vasilis Margioulas, Dr. Edmund Weitz. All rights reserved.
--- /project/rdnzl/cvsroot/RDNZL/port-lw.lisp 2006/02/01 12:02:21 1.4
+++ /project/rdnzl/cvsroot/RDNZL/port-lw.lisp 2006/02/18 22:26:12 1.5
@@ -1,5 +1,5 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: RDNZL; Base: 10 -*-
-;;; $Header: /project/rdnzl/cvsroot/RDNZL/port-lw.lisp,v 1.4 2006/02/01 12:02:21 eweitz Exp $
+;;; $Header: /project/rdnzl/cvsroot/RDNZL/port-lw.lisp,v 1.5 2006/02/18 22:26:12 eweitz Exp $
;;; Copyright (c) 2004-2006, Dr. Edmund Weitz. All rights reserved.
@@ -70,7 +70,7 @@
(ffi-integer :int)
(ffi-boolean :boolean)
(ffi-wide-char :wchar-t)
- (ffi-float :float)
+ (ffi-float :lisp-float)
(ffi-double :double)))
(defmacro ffi-define-function* ((lisp-name c-name)
@@ -88,6 +88,7 @@
arg-list)
:result-type ,(ffi-map-type result-type)
:calling-convention :cdecl
+ :language :ansi-c
;; use the last module that was registered
,@(when *module-name*
(list :module *module-name*))))
@@ -199,15 +200,13 @@
(defvar *exit-function-registered* nil
"Whether LW:DEFINE-ACTION was already called for DllForceTerm.")
-(defun register-exit-function (function &optional name)
+(defmacro register-exit-function (function &optional name)
"Makes sure the function FUNCTION \(with no arguments) is called
before the Lisp images exits."
- (unless *exit-function-registered*
- (lw:define-action "When quitting image"
- name
- function
- :once)
- (setq *exit-function-registered* t)))
+ `(unless *exit-function-registered*
+ (lw:define-action "When quitting image"
+ ,name ,function :once)
+ (setq *exit-function-registered* t)))
(defun full-gc ()
"Invokes a full garbage collection."
--- /project/rdnzl/cvsroot/RDNZL/port-sbcl.lisp 2006/02/01 12:02:21 1.2
+++ /project/rdnzl/cvsroot/RDNZL/port-sbcl.lisp 2006/02/18 22:26:12 1.3
@@ -1,5 +1,5 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: RDNZL; Base: 10 -*-
-;;; $Header: /project/rdnzl/cvsroot/RDNZL/port-sbcl.lisp,v 1.2 2006/02/01 12:02:21 eweitz Exp $
+;;; $Header: /project/rdnzl/cvsroot/RDNZL/port-sbcl.lisp,v 1.3 2006/02/18 22:26:12 eweitz Exp $
;;; Copyright (c) 2004-2006, Dr. Edmund Weitz. All rights reserved.
--- /project/rdnzl/cvsroot/RDNZL/rdnzl.asd 2006/02/01 12:02:21 1.5
+++ /project/rdnzl/cvsroot/RDNZL/rdnzl.asd 2006/02/18 22:26:12 1.6
@@ -1,5 +1,5 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
-;;; $Header: /project/rdnzl/cvsroot/RDNZL/rdnzl.asd,v 1.5 2006/02/01 12:02:21 eweitz Exp $
+;;; $Header: /project/rdnzl/cvsroot/RDNZL/rdnzl.asd,v 1.6 2006/02/18 22:26:12 eweitz Exp $
;;; Copyright (c) 2004, Dr. Edmund Weitz. All rights reserved.
@@ -39,7 +39,7 @@
(defsystem #:rdnzl
:serial t
- :version "0.9.1"
+ :version "0.9.4"
:components ((:file "packages")
(:file "specials")
(:file "util")
--- /project/rdnzl/cvsroot/RDNZL/reader.lisp 2006/02/01 12:02:21 1.4
+++ /project/rdnzl/cvsroot/RDNZL/reader.lisp 2006/02/18 22:26:12 1.5
@@ -1,5 +1,5 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: RDNZL; Base: 10 -*-
-;;; $Header: /project/rdnzl/cvsroot/RDNZL/reader.lisp,v 1.4 2006/02/01 12:02:21 eweitz Exp $
+;;; $Header: /project/rdnzl/cvsroot/RDNZL/reader.lisp,v 1.5 2006/02/18 22:26:12 eweitz Exp $
;;; Copyright (c) 2004-2006, Dr. Edmund Weitz. All rights reserved.
--- /project/rdnzl/cvsroot/RDNZL/specials.lisp 2006/02/01 12:02:21 1.4
+++ /project/rdnzl/cvsroot/RDNZL/specials.lisp 2006/02/18 22:26:12 1.5
@@ -1,5 +1,5 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: RDNZL; Base: 10 -*-
-;;; $Header: /project/rdnzl/cvsroot/RDNZL/specials.lisp,v 1.4 2006/02/01 12:02:21 eweitz Exp $
+;;; $Header: /project/rdnzl/cvsroot/RDNZL/specials.lisp,v 1.5 2006/02/18 22:26:12 eweitz Exp $
;;; Copyright (c) 2004-2006, Dr. Edmund Weitz. All rights reserved.
@@ -85,6 +85,11 @@
"A stack which holds the previous readtables that have been pushed
here by ENABLE-RDNZL-SYNTAX.")
+(defvar *coerce-double-floats-to-single* nil
+ "If this is true, then BOX will convert a Lisp DOUBLE-FLOAT
+value to System.Single. This is mainly interesting for
+LispWorks, where Lisp floats are always DOUBLE-FLOAT.")
+
(pushnew :rdnzl *features*)
;; stuff for Nikodemus Siivola's HYPERDOC
--- /project/rdnzl/cvsroot/RDNZL/util.lisp 2006/02/01 12:02:21 1.4
+++ /project/rdnzl/cvsroot/RDNZL/util.lisp 2006/02/18 22:26:12 1.5
@@ -1,5 +1,5 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: RDNZL; Base: 10 -*-
-;;; $Header: /project/rdnzl/cvsroot/RDNZL/util.lisp,v 1.4 2006/02/01 12:02:21 eweitz Exp $
+;;; $Header: /project/rdnzl/cvsroot/RDNZL/util.lisp,v 1.5 2006/02/18 22:26:12 eweitz Exp $
;;; Copyright (c) 2004-2006, Dr. Edmund Weitz. All rights reserved.
More information about the Rdnzl-cvs
mailing list