diff options
author | Rich Hickey <richhickey@gmail.com> | 2010-04-13 09:25:36 -0400 |
---|---|---|
committer | Rich Hickey <richhickey@gmail.com> | 2010-04-13 09:25:36 -0400 |
commit | 4f6fda54954fe7407967d65a5518906453312395 (patch) | |
tree | 2d26c5ce949bf9c4451fa51844e9c4e037b95a33 | |
parent | 9694a92d84ddffb6794fa97efd429b5e23285553 (diff) |
add manual locals clearing to Java side of nth and count
-rw-r--r-- | src/jvm/clojure/lang/RT.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jvm/clojure/lang/RT.java b/src/jvm/clojure/lang/RT.java index 57edb757..cabe8a7a 100644 --- a/src/jvm/clojure/lang/RT.java +++ b/src/jvm/clojure/lang/RT.java @@ -495,7 +495,7 @@ static public IPersistentMap meta(Object x){ public static int count(Object o){ if(o instanceof Counted) return ((Counted) o).count(); - return countFrom(o); + return countFrom(Util.ret1(o, o = null)); } static int countFrom(Object o){ @@ -725,7 +725,7 @@ static public Object dissoc(Object coll, Object key) throws Exception{ static public Object nth(Object coll, int n){ if(coll instanceof Indexed) return ((Indexed) coll).nth(n); - return nthFrom(coll, n); + return nthFrom(Util.ret1(coll, coll = null), n); } static Object nthFrom(Object coll, int n){ |