-/* Cycript - Remove Execution Server and Disassembler
+/* Cycript - Inlining/Optimizing JavaScript Compiler
* Copyright (C) 2009 Jay Freeman (saurik)
*/
#ifndef CYCRIPT_HPP
#define CYCRIPT_HPP
-#include <JavaScriptCore/JavaScript.h>
-
#include <apr_pools.h>
-#include <ffi.h>
-
#include <sig/types.hpp>
+#include <sstream>
+
+#include "String.hpp"
+
+void CYInitializeStatic();
bool CYRecvAll_(int socket, uint8_t *data, size_t size);
bool CYSendAll_(int socket, const uint8_t *data, size_t size);
+void CYNumerify(std::ostringstream &str, double value);
+void CYStringify(std::ostringstream &str, const char *data, size_t size);
+
+double CYCastDouble(const char *value, size_t size);
+double CYCastDouble(const char *value);
+
extern "C" void CYHandleClient(apr_pool_t *pool, int socket);
template <typename Type_>
return CYSendAll_(socket, reinterpret_cast<const uint8_t *>(data), size);
}
-JSGlobalContextRef CYGetJSContext();
-JSObjectRef CYGetGlobalObject(JSContextRef context);
-const char *CYExecute(apr_pool_t *pool, const char *code);
-
-void CYSetArgs(int argc, const char *argv[]);
+apr_pool_t *CYGetGlobalPool();
#endif/*CYCRIPT_HPP*/