Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gendl
gendl
Commits
cc725e55
Commit
cc725e55
authored
Nov 14, 2013
by
Dave Cooper
Browse files
added new option to set-slots
parent
743b4df0
Changes
2
Hide whitespace changes
Inline
Side-by-side
base/rest/source/vanilla-mixin.lisp
View file @
cc725e55
...
...
@@ -540,11 +540,12 @@ as <tt>:settable</tt> for this to work properly. Any dependent slots in the tree
respond accordingly when they are next demanded. Note that the slots must be specified as a keyword
symbols (i.e. prepended with a colon (``:'')), otherwise they will be evaluated as variables according
to normal Lisp functional evaluation rules.
:arguments (slots-and-values \"Plist. Contains alternating slots and values to which they are to be set.\")"
:arguments (slots-and-values \"Plist. Contains alternating slots and values to which they are to be set.\"
warn-on-non-toplevel? \"Boolean. Indicates whether a warning should be issued for calling from inside the body of a cached slot. Default is t.\")"
set-slots!
(
keys-and-values
&key
(
remember?
t
))
(
keys-and-values
&key
(
remember?
t
)
(
warn-on-non-toplevel?
t
))
(
mapc
#'
(
lambda
(
key
value
)
(
the
(
:set-slot!
key
value
:remember?
remember?
)))
(
the
(
:set-slot!
key
value
:remember?
remember?
:warn-on-non-toplevel?
warn-on-non-toplevel?
)))
(
plist-keys
keys-and-values
)
(
plist-values
keys-and-values
)))
(
modify-attributes!
...
...
gwl/source/base-html-utils.lisp
View file @
cc725e55
...
...
@@ -60,6 +60,12 @@ by user application code.")
;; FLAG -- this is not thread-safe - you can get the same instance ID
;; if called simultaneously by two threads.
;;
;; FLAG -- we also have to protect against the (unlikely but possible)
;; case that the same number comes back twice within a second from the
;; random generator. Only way is to store the resutls and check
;; against previous results.
;;
;;
(
defun
make-new-instance-id
(
&key
(
max-value
*max-id-value*
))
(
let
((
*print-base*
16
)
(
universal-time
(
get-universal-time
))
(
random
(
random
max-value
*iid-random-state*
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment