X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/07db5f4d390f6a685f2754a072a1bc99735cd09b..c68747823752d0cd895fa3ec38805f98f0b19f32:/Library.cpp diff --git a/Library.cpp b/Library.cpp index 881506d..1ed182e 100644 --- a/Library.cpp +++ b/Library.cpp @@ -1,5 +1,5 @@ /* Cycript - Optimizing JavaScript Compiler/Runtime - * Copyright (C) 2009-2010 Jay Freeman (saurik) + * Copyright (C) 2009-2012 Jay Freeman (saurik) */ /* GNU Lesser General Public License, Version 3 {{{ */ @@ -246,14 +246,11 @@ void CYArrayPush(JSContextRef context, JSObjectRef array, JSValueRef value) { extern "C" void CydgetPoolParse(apr_pool_t *remote, const uint16_t **data, size_t *size) { CYLocalPool local; - CYDriver driver; - cy::parser parser(driver); - CYUTF8String utf8(CYPoolUTF8String(local, CYUTF16String(*data, *size))); + CYStream stream(utf8.data, utf8.data + utf8.size); + CYDriver driver(stream); - driver.data_ = utf8.data; - driver.size_ = utf8.size; - + cy::parser parser(driver); if (parser.parse() != 0 || !driver.errors_.empty()) return;