Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

… one. Also removed tabs from macros.lisp.
  • Loading branch information...
commit b630c595988641c6ab693579303f0e5009bb17b8 1 parent 00533ad
Markus Flambard authored
View
4 cleric.asd
@@ -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
10 src/bert.lisp
@@ -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
14 src/macros.lisp
@@ -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
3  src/node-protocol.lisp
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.