summaryrefslogtreecommitdiff
path: root/src/cli/runtime/PersistentArray.cs
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2006-07-28 17:58:11 +0000
committerRich Hickey <richhickey@gmail.com>2006-07-28 17:58:11 +0000
commitf6beae41f544340607bddb4a217abd249d085fc6 (patch)
tree565b0fe933fdb55899739f349a13d342d7f68791 /src/cli/runtime/PersistentArray.cs
parent11a4dd18b1a472ca65870293efc5efb9759255c9 (diff)
derived from Obj
Diffstat (limited to 'src/cli/runtime/PersistentArray.cs')
-rw-r--r--src/cli/runtime/PersistentArray.cs19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/cli/runtime/PersistentArray.cs b/src/cli/runtime/PersistentArray.cs
index 912e31cc..73b7a369 100644
--- a/src/cli/runtime/PersistentArray.cs
+++ b/src/cli/runtime/PersistentArray.cs
@@ -44,7 +44,7 @@ namespace clojure.lang
* Java implementation is lock-free
*/
-public class PersistentArray : IEnumerable, IArray{
+public class PersistentArray : Obj, IEnumerable, IArray{
#region IEnumerable Members
@@ -61,6 +61,13 @@ public class PersistentArray : IEnumerable, IArray{
return new Seq(this, 0);
return null;
}
+
+ public override Obj withMeta(IPersistentMap meta)
+ {
+ Obj ret = (Obj)MemberwiseClone();
+ ret._meta = meta;
+ return ret;
+ }
internal class Master{
internal readonly Entry[] array;
@@ -460,16 +467,20 @@ if (data.master.rev == data.rev)
internal virtual PersistentArray create(Master master, int rev, int baseline, BitArray history)
{
- return new PersistentArray(data.master, rev, baseline, history);
+ PersistentArray ret = new PersistentArray(data.master, rev, baseline, history);
+ ret._meta = _meta;
+ return ret;
}
internal virtual PersistentArray create(int size, Object defaultVal, float loadFactor)
{
- return new PersistentArray(size, defaultVal, loadFactor);
+ PersistentArray ret = new PersistentArray(size, defaultVal, loadFactor);
+ ret._meta = _meta;
+ return ret;
}
-/*
+//*
[STAThread]
static public void Main(String[] args){
if(args.Length != 3)