Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

renamed table() to getns()

  • Loading branch information...
commit dca114e71248ddd7a172e38ff6dc9956db09c6cf 1 parent 345aff1
@richhickey richhickey authored
Showing with 6 additions and 7 deletions.
  1. +1 −2  clojure.iml
  2. +5 −5 src/jvm/clojure/lang/Var.java
View
3  clojure.iml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<module version="4" relativePaths="true" type="JAVA_MODULE">
+<module relativePaths="true" type="JAVA_MODULE" version="4">
<component name="BuildJarSettings">
<containerInfo>
<containerElement type="module" name="clojure">
@@ -11,7 +11,6 @@
<setting name="buildJar" value="true" />
<setting name="mainClass" value="clojure.lang.Compiler" />
</component>
- <component name="ModuleRootManager" />
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/classes" />
<exclude-output />
View
10 src/jvm/clojure/lang/Var.java
@@ -60,7 +60,7 @@ public static Var intern(Symbol sym, Object root){
}
public static Var intern(Symbol sym, Object root, boolean replaceRoot){
- ConcurrentHashMap<Symbol, Var> table = table(sym);
+ ConcurrentHashMap<Symbol, Var> table = getns(sym);
Var dvout = table.get(sym);
boolean present = dvout != null;
@@ -83,7 +83,7 @@ public String toString(){
}
public static Var intern(Symbol sym){
- ConcurrentHashMap<Symbol, Var> table = table(sym);
+ ConcurrentHashMap<Symbol, Var> table = getns(sym);
Var dvout = table.get(sym);
if(dvout != null)
return dvout;
@@ -95,14 +95,14 @@ public static Var intern(Symbol sym){
}
public static void unintern(Symbol sym){
- table(sym).remove(sym);
+ getns(sym).remove(sym);
}
public static Var find(Symbol sym){
- return table(sym).get(sym);
+ return getns(sym).get(sym);
}
-static ConcurrentHashMap<Symbol, Var> table(Symbol sym){
+static ConcurrentHashMap<Symbol, Var> getns(Symbol sym){
String name = sym.ns;
if(name == null)
throw new IllegalArgumentException("Var names must have namespace");
Please sign in to comment.
Something went wrong with that request. Please try again.