]> git.saurik.com Git - cycript.git/commitdiff
Minor refactoring, checkpoint commit.
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 10 Oct 2009 12:46:56 +0000 (12:46 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Sat, 10 Oct 2009 12:46:56 +0000 (12:46 +0000)
Library.mm
todo.txt

index fc4bd5b76ed6c486487e37bb20be6cc1f8725d5c..e43194f39f9087b0d1d326763ead3afebdda9b65 100644 (file)
@@ -1358,13 +1358,17 @@ bool Index_(apr_pool_t *pool, Struct_privateData *internal, JSStringRef property
     const char *name(CYPoolCString(pool, property, &length));
     double number(CYCastDouble(name, length));
 
-    if (std::isnan(number))
-        // XXX: implement!
-        return false;
+    if (std::isnan(number)) {
+        if (property == NULL)
+            return false;
 
-    index = static_cast<ssize_t>(number);
-    if (index != number || index < 0 || static_cast<size_t>(index) >= typical->type_.data.signature.count)
+        // XXX: implement!
         return false;
+    } else {
+        index = static_cast<ssize_t>(number);
+        if (index != number || index < 0 || static_cast<size_t>(index) >= typical->type_.data.signature.count)
+            return false;
+    }
 
     base = reinterpret_cast<uint8_t *>(internal->value_);
     for (ssize_t local(0); local != index; ++local)
index 53ef7bf307f64adf112ea9e169ada88fa9b9cc1e..7691577acef1cda13f63f2dd5733eb71976eb2a5 100644 (file)
--- a/todo.txt
+++ b/todo.txt
@@ -3,3 +3,4 @@ blocks and empty statements are poorly factored
 property labels should get minimized
 functors use both ffiData and ffoData...
 rename "data" variables to "internal"
+unicode identifier support (native and \u)