summaryrefslogtreecommitdiff
path: root/src/cli/runtime/RT.cs
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2006-10-10 19:41:48 +0000
committerRich Hickey <richhickey@gmail.com>2006-10-10 19:41:48 +0000
commita53e41cd426ebd2181d036e83ab0f8e69de9a8bf (patch)
tree78ba55f826eb636f965e03f8d79c22a44021d8f2 /src/cli/runtime/RT.cs
parentad0302cd67dc50695a9348178065f0ec090b9890 (diff)
changed box functions to box for clojure consumption
Diffstat (limited to 'src/cli/runtime/RT.cs')
-rw-r--r--src/cli/runtime/RT.cs58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/cli/runtime/RT.cs b/src/cli/runtime/RT.cs
index 059bdad6..40626d62 100644
--- a/src/cli/runtime/RT.cs
+++ b/src/cli/runtime/RT.cs
@@ -302,41 +302,41 @@ static public Object assocN(int n, Object val, Object coll) {
return x;
}
- static public Object box(bool x)
- {
- return x;
- }
-
- static public Object box(byte x)
- {
- return x;
- }
+ static public Object box(bool x)
+ {
+ return x ? T : null;
+ }
- static public Object box(short x)
- {
- return x;
- }
+ static public Num box(byte x)
+ {
+ return Num.from(x);
+ }
- static public Object box(int x)
- {
- return x;
- }
+ static public Num box(short x)
+ {
+ return Num.from(x);
+ }
- static public Object box(long x)
- {
- return x;
- }
+ static public Num box(int x)
+ {
+ return Num.from(x);
+ }
- static public Object box(float x)
- {
- return x;
- }
+ static public Num box(long x)
+ {
+ return Num.from(x);
+ }
- static public Object box(double x)
- {
- return x;
- }
+ static public Num box(float x)
+ {
+ return Num.from(x);
+ }
+ static public Num box(double x)
+ {
+ return Num.from(x);
+ }
+
static public char charCast(Object x) { return Convert.ToChar(x); }
static public bool booleanCast(Object x) { if(x is Boolean)