Skip to content

Commit ba34e57

Browse files
committed
uncontextify defprotocol
1 parent 600ccf6 commit ba34e57

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/sci/impl/namespaces.cljc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,7 @@
11351135
;; end multimethods
11361136
;; protocols
11371137
'defprotocol (macrofy 'defprotocol sci.impl.protocols/defprotocol
1138-
clojure-core-ns true)
1138+
clojure-core-ns)
11391139
'extend (copy-var sci.impl.protocols/extend clojure-core-ns {:name 'extend :ctx true})
11401140
'extends? (copy-core-var sci.impl.protocols/extends?)
11411141
'extend-type (macrofy 'extend-type sci.impl.protocols/extend-type

src/sci/impl/protocols.cljc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
[arglists nil])]
3131
[(keyword name) {:name name :arglists arglists :doc doc}])) signatures)))
3232

33-
(defn defprotocol [_ _ _ctx protocol-name & signatures]
33+
(defn defprotocol [_ _ protocol-name & signatures]
3434
(let [[docstring signatures]
3535
(let [sig (first signatures)]
3636
(if (string? sig) [sig (rest signatures)]
@@ -54,7 +54,7 @@
5454
:var (var ~fq-name)}
5555
~extend-meta (assoc :extend-via-metadata true)))
5656
~@(map (fn [[method-name & _]]
57-
(let [fq-name (symbol (str current-ns) (str method-name))
57+
(let [fq-name (symbol current-ns (str method-name))
5858
method-meta (select-keys (get sigs-map (keyword method-name)) [:doc :arglists])
5959
; re-quote arglists
6060
method-meta (update method-meta :arglists (fn [a] (list 'quote a)))

0 commit comments

Comments
 (0)