]> git.saurik.com Git - cycript.git/blame - cycript.h
Finished implementing strings.
[cycript.git] / cycript.h
CommitLineData
057f943f
JF
1#ifndef CYCRIPT_H
2#define CYCRIPT_H
3
4#ifdef __OBJC__
5#include <Foundation/Foundation.h>
6#endif
7
8#include <JavaScriptCore/JSBase.h>
9#include <JavaScriptCore/JSValueRef.h>
10#include <JavaScriptCore/JSObjectRef.h>
11#include <JavaScriptCore/JSContextRef.h>
12#include <JavaScriptCore/JSStringRef.h>
13#include <JavaScriptCore/JSStringRefCF.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19JSContextRef CYGetJSContext();
20CFStringRef CYCopyJSONString(JSContextRef context, JSValueRef value);
21
22#ifdef __OBJC__
23void CYThrowNSError(JSContextRef context, id error, JSValueRef *exception);
24#endif
25
26#ifdef __cplusplus
27}
28#endif
29
30#ifdef __cplusplus
31inline void CYThrow(JSContextRef context, id error, JSValueRef *exception) {
32 return CYThrowNSError(context, error, exception);
33}
34#endif
35
36#endif/*CYCRIPT_H*/