Commit 45ca8e88 authored by Liam Healy's avatar Liam Healy

Eliminated dependency on cl-utilities; error for obsolete defmpar

The defmobject argument 'class-slots-instance is no longer used, so
#'callback-arg-p and the only use of with-unique-names can be
eliminated, and thus the dependency on cl-utilities.

Constant GSL functions in the library (such as minimizers) which
were introduced in a GSL version newer than loaded now expand as
symbol macros which signal the 'obsolete-gsl-version error.
parent 86d01196
......@@ -112,8 +112,6 @@ combination for which the following are supported:</p>
version 0.10.0 or newer; callbacks and <code>foreign-funcall</code> must be supported
<li><a href="">trivial-garbage</a>
<li><a href="">cl-utilities</a>
<li><a href="">ASDF</a></li>
<li><a href="">lisp-unit</a>, <i>(Optional)</i> necessary
to run <code>gsll-tests</code>
......@@ -155,11 +153,10 @@ Then in Lisp, load the system:
<li><code>gsll get_git git://</code></li>
<li><code>trivial-garbage get_darcs</code></li>
<li><code>cl-utilities get_cvs_clnet</code></li>
<p>and add
<li><code>gsll cffi trivial-garbage cl-utilities</code></li>
<li><code>gsll cffi trivial-garbage</code></li>
to <code>dependencies</code> and execute
......@@ -169,7 +166,7 @@ from within the clbuild directory:
<h3>With Debian or Ubuntu</h3>
<li><code>sudo aptitude install libgsl0-dev cl-cffi cl-utilities</code></li>
<li><code>sudo aptitude install libgsl0-dev cl-cffi</code></li>
<li><code>git clone git://</code></li>
<li><code>darcs get</code></li>
<li><code>clc-register-user-package trivial-garbage/trivial-garbage.asd</code></li>
......@@ -388,7 +385,7 @@ and arrays used internally or for function return.
<!-- Created: Feb 25 2005 -->
<!-- hhmts start -->
Time-stamp: <2009-03-31 22:41:54EDT index.html>
Time-stamp: <2009-04-04 09:58:19EDT index.html>
<!-- hhmts end -->
;; Definition of GSLL system
;; Liam Healy
;; Time-stamp: <2009-04-02 22:34:36EDT gsll.asd>
;; Time-stamp: <2009-04-04 09:55:40EDT gsll.asd>
;; $Id$
(asdf:defsystem "gsll"
......@@ -9,7 +9,7 @@
:version "0"
:author "Liam M. Healy"
:licence "LLGPL v3, FDL"
:depends-on (cffi trivial-garbage cl-utilities)
:depends-on (cffi trivial-garbage)
((:module init
;; Foreign callback functions.
;; Liam Healy
;; Time-stamp: <2009-04-02 22:32:19EDT callback.lisp>
;; Time-stamp: <2009-04-04 09:55:41EDT callback.lisp>
;; $Id$
(in-package :gsl)
......@@ -126,9 +126,6 @@
;;;; Using callback specification in function arugments
(defun callback-arg-p (arglist callbacks &optional key)
(member (parse-callback-static callbacks 'foreign-argument) arglist :key key))
(defun callback-replace-arg (replacement list callbacks)
"Replace in the list the symbol representing the foreign callback argument."
(if callbacks
;; Load GSL
;; Liam Healy Sat Mar 4 2006 - 18:53
;; Time-stamp: <2009-01-27 21:32:59EST init.lisp>
;; Time-stamp: <2009-04-04 09:55:29EDT init.lisp>
;; $Id$
(defpackage gsll
......@@ -38,21 +38,3 @@
(eval-when (:compile-toplevel :load-toplevel :execute)
(pushnew :native *features*))
(eval-when (:compile-toplevel :load-toplevel :execute)
(pushnew :callback-toplevel-only *features*))
;;; CFFI currently doesn't allow uninterned callback names for CCL;
;;; patch here. This patch can be removed once the fix in CFFI:
;;; makes it into a released version.
#-openmcl (import 'cl-utilities:with-unique-names :gsll)
(defmacro gsll::with-unique-names ((&rest bindings) &body body)
(let ,(mapcar (lambda (symb) `(,symb (intern (symbol-name ,symb))))
;; Macros to interface GSL functions, including definitions necessary for defmfun.
;; Liam Healy
;; Time-stamp: <2009-03-31 22:51:22EDT interface.lisp>
;; Time-stamp: <2009-04-04 12:02:28EDT interface.lisp>
;; $Id$
(in-package :gsl)
......@@ -141,8 +141,8 @@
;; Insufficient version number handled by binding a special of
;; the same name to the condition. It would be nice to signal
;; the error, but it least this will provide some information.
`(defparameter ,cl-symbol
`(define-symbol-macro ,cl-symbol
'obsolete-gsl-version :name ',cl-symbol :gsl-name
,gsl-symbol :gsl-version ',gsl-version ))))
;; Definition of GSL objects and ways to use them.
;; Liam Healy, Sun Dec 3 2006 - 10:21
;; Time-stamp: <2009-04-01 21:36:13EDT mobject.lisp>
;; Time-stamp: <2009-04-04 09:51:08EDT mobject.lisp>
;;; GSL objects are represented in GSLL as and instance of a 'mobject.
;;; The macro demobject takes care of defining the appropriate
......@@ -45,7 +45,6 @@
;;; allocator
;;; allocate-inputs
;;; freer
;;; class-slots-instance
;;; callbacks
;;; See callbacks.lisp
;;; superclasses
......@@ -58,7 +57,7 @@
(class prefix allocation-args description
&key documentation initialize-suffix initialize-name initialize-args
arglists-function inputs gsl-version allocator allocate-inputs freer
class-slots-instance callbacks
(superclasses (if callbacks '(callback-included) '(mobject)))
"Define the class, the allocate, initialize-instance and
......@@ -105,8 +104,7 @@
class cl-initialize-args initialize-name prefix
initialize-suffix initialize-args inputs
(and (not (callback-arg-p class-slots-instance callbacks))
(export '(,maker ,class))
,@(when callbacks `((record-callbacks-for-class ',class ',callbacks)))
......@@ -114,7 +112,7 @@
maker arglists class cl-alloc-args cl-initialize-args
description documentation initialize-args initializerp settingp
singular class-slots-instance callbacks))
singular callbacks))
(export ',maker)
(defun ,maker (&rest args)
......@@ -182,7 +180,7 @@
(defun mobject-maker
(maker arglists class cl-alloc-args cl-initialize-args
description documentation initialize-args initializerp settingp
singular class-slots-instance callbacks)
singular callbacks)
"Make the defun form that makes the mobject."
(when callbacks
(setf cl-initialize-args (append cl-initialize-args '((scalarsp t)))))
......@@ -194,8 +192,6 @@
'functions class-slots-instance callbacks)
,@(when initargs
......@@ -211,22 +207,9 @@
,@(when callbacks `(:callbacks ',callbacks))
(callback-remove-arg class-slots-instance callbacks))
,@(when (callback-arg-p class-slots-instance callbacks)
(symbol-keyword-symbol 'functions))
,@(if arglists
(second arglists)
(symbol-keyword-symbol cl-alloc-args singular)))))
;; There is callback slot variable
,@(when (callback-arg-p class-slots-instance callbacks)
(with-unique-names (cbs)
`((let ((,cbs ,(make-cbstruct-object class)))
(setf (slot-value
',(parse-callback-static callbacks 'foreign-argument))
(tg:finalize object (lambda () (foreign-free ,cbs)))))))
;; There is an initialization step
,@(when initializerp
(if (or initialize-args arglists) ; with arguments
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment