Permalink
Browse files

JSNull is now a singleton.

  • Loading branch information...
1 parent 5f22db3 commit 4046b2d74422fdb6a0032b19a2c2e94cae6c2723 @portify committed Nov 15, 2012
Showing with 7 additions and 4 deletions.
  1. +6 −3 jettison.cs
  2. +1 −1 jsx.cs
View
9 jettison.cs
@@ -454,10 +454,13 @@ function json_scan_once( %string, %index, %fast )
}
else
{
- %obj = new scriptObject()
+ if ( !isObject( %obj = nameToID( "_JSNull" ) ) )
{
- class = "JSNull";
- };
+ %obj = new scriptObject( "_JSNull" )
+ {
+ class = "JSNull";
+ };
+ }
return %obj TAB %index + 4;
}
View
2 jsx.cs
@@ -83,7 +83,7 @@
function JSNull::killTree( %this )
{
- %this.schedule( 0, "delete" );
+ // This is static; don't get rid of it.
}
// describe methods.

0 comments on commit 4046b2d

Please sign in to comment.