Loading...
Searching...
No Matches
mjs_dataview.h
1/*
2 * Copyright (c) 2017 Cesanta Software Limited
3 * All rights reserved
4 */
5
6#ifndef MJS_DATAVIEW_H_
7#define MJS_DATAVIEW_H_
8
9#if defined(__cplusplus)
10extern "C" {
11#endif /* __cplusplus */
12
13/*
14 * Functions for memory introspection.
15 * These are supposed to be FFI-ed and used from the JS environment.
16 */
17
18void* mjs_mem_to_ptr(unsigned int val);
19void* mjs_mem_get_ptr(void* base, int offset);
20void mjs_mem_set_ptr(void* ptr, void* val);
21double mjs_mem_get_dbl(void* ptr);
22void mjs_mem_set_dbl(void* ptr, double val);
23double mjs_mem_get_uint(void* ptr, int size, int bigendian);
24double mjs_mem_get_int(void* ptr, int size, int bigendian);
25void mjs_mem_set_uint(void* ptr, unsigned int val, int size, int bigendian);
26void mjs_mem_set_int(void* ptr, int val, int size, int bigendian);
27
28#if defined(__cplusplus)
29}
30#endif /* __cplusplus */
31
32#endif /* MJS_DATAVIEW_H_ */