Skip to content

Commit adea735

Browse files
committed
direct-linking fix: use clojure.core/declare for JVM clojure
1 parent fa222f7 commit adea735

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/datascript/db.cljc

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -163,17 +163,17 @@
163163

164164
;; ----------------------------------------------------------------------------
165165

166-
(declare+ ^number hash-datom [d])
166+
#?(:cljs (declare+ ^number hash-datom [d]) :clj (declare hash-datom))
167167

168-
(declare+ ^boolean equiv-datom [d o])
168+
#?(:cljs (declare+ ^boolean equiv-datom [d o]) :clj (declare equiv-datom))
169169

170-
(declare+ seq-datom [d])
170+
#?(:cljs (declare+ seq-datom [d]) :clj (declare seq-datom))
171171

172-
(declare+ nth-datom [d i] [d i not-found])
172+
#?(:cljs (declare+ nth-datom [d i] [d i not-found]) :clj (declare nth-datom))
173173

174-
(declare+ assoc-datom [d k v])
174+
#?(:cljs (declare+ assoc-datom [d k v]) :clj (declare assoc-datom))
175175

176-
(declare+ val-at-datom [d k not-found])
176+
#?(:cljs (declare+ val-at-datom [d k not-found]) :clj (declare val-at-datom))
177177

178178
(defprotocol IDatom
179179
(datom-tx [this])
@@ -584,22 +584,22 @@
584584

585585
;; ----------------------------------------------------------------------------
586586

587-
(declare+ ^number hash-db [db])
587+
#?(:cljs (declare+ ^number hash-db [db]) :clj (declare hash-db))
588588

589-
(declare+ ^number hash-fdb [db])
589+
#?(:cljs (declare+ ^number hash-fdb [db]) :clj (declare hash-fdb))
590590

591-
(declare+ ^boolean equiv-db [db other])
591+
#?(:cljs (declare+ ^boolean equiv-db [db other]) :clj (declare equiv-db))
592592

593-
(declare+ restore-db [keys])
593+
#?(:cljs (declare+ restore-db [keys]) :clj (declare restore-db))
594594

595-
(declare+ ^boolean indexing? [db attr])
595+
#?(:cljs (declare+ ^boolean indexing? [db attr]) :clj (declare indexing?))
596596

597597
#?(:cljs
598598
(declare+ pr-db [db w opts]))
599599

600-
(declare+ resolve-datom [db e a v t default-e default-tx])
600+
#?(:cljs (declare+ resolve-datom [db e a v t default-e default-tx]) :clj (declare resolve-datom))
601601

602-
(declare+ components->pattern [db index c0 c1 c2 c3 default-e default-tx])
602+
#?(:cljs (declare+ components->pattern [db index c0 c1 c2 c3 default-e default-tx]) :clj (declare components->pattern))
603603

604604
;;;;;;;;;; Fast validation
605605

@@ -1122,9 +1122,9 @@
11221122

11231123
;; ----------------------------------------------------------------------------
11241124

1125-
(declare+ ^number entid-strict [db eid])
1125+
#?(:cljs (declare+ ^number entid-strict [db eid]) :clj (declare entid-strict))
11261126

1127-
(declare+ ^boolean ref? [db attr])
1127+
#?(:cljs (declare+ ^boolean ref? [db attr]) :clj (declare ref?))
11281128

11291129
(defn+ resolve-datom [db e a v t default-e default-tx]
11301130
(when (some? a)

0 commit comments

Comments
 (0)