-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathupython.h
59 lines (39 loc) · 1.14 KB
/
upython.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef UPYTHON_H
#include <stdarg.h>
#include "py/nlr.h"
#include "py/compile.h"
#include "py/runtime.h"
#include "py/repl.h"
#include "py/gc.h"
#include "lib/utils/pyexec.h"
#include "py/mphal.h"
#define IS_FILE 1
#define IS_STR 0
#ifdef __EMSCRIPTEN__
#include "emscripten.h"
#else
#define EMSCRIPTEN_KEEPALIVE
#endif
extern size_t bsd_strlen(const char *str);
//EMSCRIPTEN_KEEPALIVE void Py_InitializeEx(int param);
//EMSCRIPTEN_KEEPALIVE void PyRun_SimpleString(const char * code);
#if WASM_FILE_API
EMSCRIPTEN_KEEPALIVE void PyRun_SimpleFile(FILE *fp, const char *filename);
EMSCRIPTEN_KEEPALIVE void PyRun_VerySimpleFile(const char *filename);
#endif
int do_code(const char *src, int is_file);
#define PATHLIST_SEP_CHAR ':'
#if MICROPY_ENABLE_GC
static char heap[32*1024*1024];
#endif
#define REPL_INPUT_SIZE 16384
#define REPL_INPUT_MAX REPL_INPUT_SIZE-1
#define nullptr NULL
#define Py_RETURN_NONE return nullptr;
#define PyObject mp_obj_t
#include "core/ringbuf_b.h"
#include "core/ringbuf_o.h"
int PyArg_ParseTuple(PyObject *argv, const char *fmt, ...);
static int repl_started = -100;
#define UPYTHON_H 1
#endif //UPYTHON_H