]> git.saurik.com Git - cycript.git/blobdiff - Execute.cpp
Add a ?reparse mode to experiment pretty printing.
[cycript.git] / Execute.cpp
index 527d2cc39786974828502ca34055ff4964327551..5dbdd58fc66f712c3dd7747818990110c20d5264 100644 (file)
@@ -148,6 +148,14 @@ const char *CYPoolCString(CYPool &pool, CYUTF8String utf8) {
     return pool.strndup(utf8.data, utf8.size);
 }
 
+CYUTF8String CYPoolUTF8String(CYPool &pool, CYUTF8String utf8) {
+    return {pool.strndup(utf8.data, utf8.size), utf8.size};
+}
+
+_visible CYUTF8String CYPoolUTF8String(CYPool &pool, const std::string &value) {
+    return {pool.strndup(value.data(), value.size()), value.size()};
+}
+
 CYUTF8String CYPoolUTF8String(CYPool &pool, JSContextRef context, JSStringRef value) {
     return CYPoolUTF8String(pool, CYCastUTF16String(value));
 }