diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cli/runtime/Keyword.cs | 3 | ||||
-rw-r--r-- | src/jvm/clojure/lang/Keyword.java | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/cli/runtime/Keyword.cs b/src/cli/runtime/Keyword.cs index 90e862b9..69d9a4e1 100644 --- a/src/cli/runtime/Keyword.cs +++ b/src/cli/runtime/Keyword.cs @@ -24,7 +24,8 @@ internal Keyword(String name):base(name)
{
}
public Object invoke() /*throws }
/**
* Indexer implements IFn for attr access
* This single arg version is the getter
* @param tld
* @param obj - must be AMap
* @return the value of the attr or nil if not found
*/
public Object invoke( Object obj) /*throws Exception*/
{
if (obj == null)
return null;
- return ((IObj)obj).getAttr(this);
}
/**
* Indexer implements IFn for attr access
* This two arg version is the setter
* @param tld
* @param obj - must be AMap
* @param val
* @return val
*/
public Object invoke( Object obj, Object val) /*throws Exception*/
{
return ((IObj)obj).putAttr(this,val);
} + return ((IPersistentMap)obj).get(this);
}
/**
* Indexer implements IFn for attr access
* This two arg version is the setter
* @param tld
* @param obj - must be AMap
* @param val
* @return val
*/
public Object invoke( Object obj, Object val) /*throws Exception*/
{
+ return ((IPersistentMap)obj).put(this, val);
} public Object invoke( Object arg1, Object arg2, Object arg3) /*throws Exception*/
{
diff --git a/src/jvm/clojure/lang/Keyword.java b/src/jvm/clojure/lang/Keyword.java index 0062db2f..633100a5 100644 --- a/src/jvm/clojure/lang/Keyword.java +++ b/src/jvm/clojure/lang/Keyword.java @@ -43,7 +43,7 @@ public Object invoke(Object obj) throws Exception { if (obj == null) return null; - return ((IObj)obj).getAttr(this); + return ((IPersistentMap)obj).get(this); } /** @@ -56,7 +56,7 @@ public Object invoke(Object obj) throws Exception */ public Object invoke(Object obj, Object val) throws Exception { - return ((IObj)obj).putAttr(this,val); + return ((IPersistentMap)obj).put(this,val); } public Object invoke( Object arg1, Object arg2, Object arg3) throws Exception |