]> git.saurik.com Git - cycript.git/commitdiff
Replace only use of apr_strtok with manual loop.
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 21 Jun 2013 22:08:36 +0000 (15:08 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Fri, 21 Jun 2013 22:08:36 +0000 (15:08 -0700)
ObjectiveC/Library.mm

index e430c0ceaedaa1bd0f2a520796dc4c84b50c7878..4215453ce67ee8e38554fdd7fd2465ef9d4a03a2 100644 (file)
@@ -519,7 +519,9 @@ struct PropertyAttributes {
         name = property_getName(property);
         const char *attributes(property_getAttributes(property));
 
-        for (char *state, *token(apr_strtok(pool_.strdup(attributes), ",", &state)); token != NULL; token = apr_strtok(NULL, ",", &state)) {
+        for (char *token(pool_.strdup(attributes)), *next; token != NULL; token = next) {
+            if ((next = strchr(token, ',')) != NULL)
+                *next++ = '\0';
             switch (*token) {
                 case 'R': readonly = true; break;
                 case 'C': copy = true; break;