Skip to content

Commit

Permalink
Merge pull request #10 from rpgoldman/eval-when-for-bazel
Browse files Browse the repository at this point in the history
Replaces pull request #4 which needed updating.
  • Loading branch information
rpgoldman committed May 3, 2022
2 parents 2ce9474 + 0df68a1 commit 46053c7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
8 changes: 3 additions & 5 deletions cl-json.asd
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
;;; All rights reserved.
;;; See the file LICENSE for terms of use and distribution.

(in-package #:cl-user)

(defpackage #:json-system
(:use #:cl #:asdf))
(:use :cl :asdf :uiop))

(in-package #:json-system)

Expand All @@ -26,8 +24,7 @@
:maintainer "Robert P. Goldman <[email protected]>"
:licence "MIT"
:in-order-to ((test-op (test-op "cl-json/test")))
:components ((:static-file "cl-json.asd")
(:module :src
:components ((:module "src"
:components ((:file "package")
(:file "common" :depends-on ("package"))
#+cl-json-clos
Expand All @@ -53,3 +50,4 @@
(defparameter *cl-json-directory*
(system-relative-pathname "cl-json" ""))


4 changes: 2 additions & 2 deletions src/common.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

;;; Custom variables

(eval-when (:compile-toplevel :load-toplevel)
(eval-when (:compile-toplevel :load-toplevel :execute)

(defvar *custom-vars* nil)

Expand Down Expand Up @@ -45,7 +45,7 @@
)

(defmacro define-custom-var ((key name) &rest other-args)
`(eval-when (:compile-toplevel :load-toplevel)
`(eval-when (:compile-toplevel :load-toplevel :execute)
(progn (pushnew '(,name . ,key) *custom-vars* :test #'equal)
(defvar ,name ,@other-args))))

Expand Down
4 changes: 2 additions & 2 deletions src/decoder-args.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

;;; Custom variables

(eval-when (:compile-toplevel :load-toplevel)
(eval-when (:compile-toplevel :load-toplevel :execute)

(defvar *custom-vars* nil)

Expand All @@ -22,7 +22,7 @@
)

(defmacro define-custom-var ((key name) &rest other-args)
`(eval-when (:compile-toplevel :load-toplevel)
`(eval-when (:compile-toplevel :load-toplevel :execute)
(progn (pushnew '(,name . ,key) *custom-vars* :test #'equal)
(defvar ,name ,@other-args))))

Expand Down
2 changes: 1 addition & 1 deletion src/encoder.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ characters in string S to STREAM."
(destructuring-bind (esc . (width . radix)) special
(format stream "\\~C~V,V,'0R" esc radix width code)))))

(eval-when (:compile-toplevel)
(eval-when (:compile-toplevel :execute)
(if (subtypep 'long-float 'single-float)
;; only one float type
(pushnew :cl-json-only-one-float-type *features*)
Expand Down
11 changes: 6 additions & 5 deletions src/objects.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,13 @@ registered in the superclass."
(declare (ignore superclass subclass))
(values))

(defmethod validate-superclass ((class fluid-class)
(superclass standard-class))
"Any fluid class is also a standard class."
t)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defmethod validate-superclass ((class fluid-class)
(superclass standard-class))
"Any fluid class is also a standard class."
t))

(finalize-inheritance
(eval-when (:compile-toplevel :load-toplevel :execute)
(defclass fluid-object (standard-object) ()
(:documentation "Any instance of a fluid class.")
(:metaclass fluid-class)))
Expand Down

0 comments on commit 46053c7

Please sign in to comment.