Merge branch 'master' into arrays
[jscl.git] / src / prelude.js
index 162058e..c40d0fa 100644 (file)
@@ -59,7 +59,7 @@ function codepoints(string) {
 // Create and return a lisp string for the Javascript string STRING.
 function make_lisp_string (string){
     var array = codepoints(string);
-    array.type = 'character'
+    array.stringp = 1
     return array;
 }
 
@@ -112,7 +112,7 @@ function Symbol(name, package_name){
 }
 
 function lisp_to_js (x) {
-    if (typeof x == 'object' && 'length' in x && x.type == 'character')
+    if (typeof x == 'object' && 'length' in x && x.stringp == 1)
         return xstring(x);
     else if (typeof x == 'function'){
         // Trampoline calling the Lisp function