#ifndef CYCRIPT_HPP
#define CYCRIPT_HPP
+#ifdef __APPLE__
+#include <JavaScriptCore/JavaScriptCore.h>
+#else
#include <JavaScriptCore/JavaScript.h>
+#endif
#include <apr_pools.h>
#include <ffi.h>
#include <sqlite3.h>
+void CYInitialize();
+
bool CYRecvAll_(int socket, uint8_t *data, size_t size);
bool CYSendAll_(int socket, const uint8_t *data, size_t size);
JSValueRef (*RuntimeProperty)(JSContextRef, CYUTF8String);
void (*CallFunction)(JSContextRef, ffi_cif *, void (*)(), uint8_t *, void **);
+ void (*SetupContext)(JSContextRef);
bool (*PoolFFI)(apr_pool_t *, JSContextRef, sig::Type *, ffi_type *, void *, JSValueRef);
JSValueRef (*FromFFI)(JSContextRef, sig::Type *, ffi_type *, void *, bool, JSObjectRef);
char *sqlite3_column_pooled(apr_pool_t *pool, sqlite3_stmt *stmt, int n);
-JSObjectRef CYMakePointer(JSContextRef context, void *pointer, sig::Type *type, ffi_type *ffi, JSObjectRef owner);
+JSObjectRef CYMakePointer(JSContextRef context, void *pointer, size_t length, sig::Type *type, ffi_type *ffi, JSObjectRef owner);
void CYFinalize(JSObjectRef object);