Skip to content

Commit

Permalink
Fixed bug in with-queue macro that would prevent the use of non-literal
Browse files Browse the repository at this point in the history
Strings or Maps.
  • Loading branch information
mefesto committed Feb 18, 2011
1 parent 55ccf62 commit 838e305
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/com/mefesto/wabbitmq.clj
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,8 @@
(queue-declare-internal)
(f)))

(defmacro with-queue [& forms]
(let [form (first forms)
cfg (if (or (instance? String form)
(symbol? form)
(map? form))
form)
body (if cfg (rest forms) forms)]
`(with-queue* ~cfg (fn [] ~@body))))
(defmacro with-queue [cfg & body]
`(with-queue* ~cfg (fn [] ~@body)))

;;; channel commands
(defn abort
Expand Down

0 comments on commit 838e305

Please sign in to comment.