Permalink
Browse files

Use DEFINE-CONSTANT from the Alexandria library instead of a homemade…

… one. Also removed tabs from macros.lisp.
  • Loading branch information...
Markus Flambard
Markus Flambard committed May 12, 2011
1 parent 00533ad commit b630c595988641c6ab693579303f0e5009bb17b8
Showing with 15 additions and 16 deletions.
  1. +2 −2 cleric.asd
  2. +6 −4 src/bert.lisp
  3. +5 −9 src/macros.lisp
  4. +2 −1 src/node-protocol.lisp
View
@@ -9,7 +9,7 @@
:author "Markus Flambard <mflambard@common-lisp.net>"
:version "0.0.8"
:license "MIT License"
- :depends-on (:usocket :md5 :ieee-floats)
+ :depends-on (:usocket :md5 :ieee-floats :alexandria)
:components
((:module :src
:components
@@ -184,7 +184,7 @@
:author "Markus Flambard <mflambard@common-lisp.net>"
:version "0.0.8"
:license "MIT License"
- :depends-on (:cleric)
+ :depends-on (:cleric :alexandria)
:components
((:module :src
:components
View
@@ -56,11 +56,13 @@
(tuple '|bert| '|true|)
(tuple '|bert| '|false|))) )
-(cleric::defconstant-not-eql true (bool t)
- "BERT boolean true term.")
+(alexandria:define-constant true (bool t)
+ :test #'equalp
+ :documentation "BERT boolean true term.")
-(cleric::defconstant-not-eql false (bool nil)
- "BERT boolean false term.")
+(alexandria:define-constant false (bool nil)
+ :test #'equalp
+ :documentation "BERT boolean false term.")
(defclass bert-time ()
View
@@ -1,14 +1,10 @@
(in-package :cleric)
-(defmacro defconstant-not-eql (name value &optional doc)
- `(defconstant ,name (if (boundp ',name) (symbol-value ',name) ,value)
- ,@(when doc (list doc))))
-
(defmacro multiple-value-bind* (bind-clauses &body body)
(if (null bind-clauses) `(progn ,@body)
(destructuring-bind ((varlist values-form) &rest rest) bind-clauses
- (if rest
- `(multiple-value-bind ,varlist ,values-form
- (multiple-value-bind* ,rest ,@body))
- `(multiple-value-bind ,varlist ,values-form
- ,@body) ))))
+ (if rest
+ `(multiple-value-bind ,varlist ,values-form
+ (multiple-value-bind* ,rest ,@body))
+ `(multiple-value-bind ,varlist ,values-form
+ ,@body) ))))
View
@@ -99,7 +99,8 @@
unless (eq message 'tick) collect message)))
-(defconstant-not-eql +tock+ #(0 0 0 0))
+(alexandria:define-constant +tock+ #(0 0 0 0)
+ :test #'equalp)
(defun read-node-message (stream)
(let ((length (handler-case (read-uint32 stream)

0 comments on commit b630c59

Please sign in to comment.