LispBM
Loading...
Searching...
No Matches
lbm_c_interop.h
Go to the documentation of this file.
1 /*
2 Copyright 2018, 2020 - 2022, 2024 Joel Svensson svenssonjoel@yahoo.se
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
20#ifndef LBM_C_INTEROP_H_
21#define LBM_C_INTEROP_H_
22
23#include "env.h"
24#include "symrepr.h"
25#include "eval_cps.h"
26#include "heap.h"
27#include "tokpar.h"
28#include "lbm_memory.h"
29#include "heap.h"
30#include "lbm_types.h"
31#include "lbm_channel.h"
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
71
72/* Evaluating a definition in a new context */
85
93
100int lbm_define(char *symbol, lbm_value value);
106int lbm_undefine(char *symbol);
116int lbm_share_array(lbm_value *value, char *data, lbm_uint num_elt);
117
126int lbm_share_array_const(lbm_value *res, char *flash_ptr, lbm_uint num_elt);
135int lbm_create_array(lbm_value *value,lbm_uint num_elt);
136
139void lbm_clear_env(void);
140
150bool lbm_flatten_env(int index, lbm_uint** data, lbm_uint *size);
151
152#ifdef __cplusplus
153}
154#endif
155#endif
int lbm_share_array_const(lbm_value *res, char *flash_ptr, lbm_uint num_elt)
Definition lbm_c_interop.c:242
void lbm_clear_env(void)
Definition lbm_c_interop.c:260
lbm_cid lbm_load_and_eval_expression(lbm_char_channel_t *tokenizer)
Definition lbm_c_interop.c:151
int lbm_create_array(lbm_value *value, lbm_uint num_elt)
Definition lbm_c_interop.c:255
lbm_cid lbm_load_and_define_program(lbm_char_channel_t *tokenizer, char *symbol)
Definition lbm_c_interop.c:167
int lbm_define(char *symbol, lbm_value value)
Definition lbm_c_interop.c:191
int lbm_share_array(lbm_value *value, char *data, lbm_uint num_elt)
Definition lbm_c_interop.c:222
lbm_cid lbm_load_and_define_expression(lbm_char_channel_t *tokenizer, char *symbol)
Definition lbm_c_interop.c:155
lbm_cid lbm_load_and_eval_program_incremental(lbm_char_channel_t *tokenizer, char *name)
Definition lbm_c_interop.c:163
int lbm_undefine(char *symbol)
Definition lbm_c_interop.c:208
lbm_cid lbm_load_and_eval_program(lbm_char_channel_t *tokenizer, char *name)
Definition lbm_c_interop.c:159
int lbm_send_message(lbm_cid cid, lbm_value msg)
Definition lbm_c_interop.c:179
lbm_cid lbm_eval_defined_program(char *symbol)
Definition lbm_c_interop.c:175
bool lbm_flatten_env(int index, lbm_uint **data, lbm_uint *size)
Definition lbm_c_interop.c:271
lbm_cid lbm_eval_defined_expression(char *symbol)
Definition lbm_c_interop.c:171
int32_t lbm_cid
Definition lbm_types.h:64
uint32_t lbm_uint
Definition lbm_types.h:48
uint32_t lbm_value
Definition lbm_types.h:44
Definition lbm_channel.h:69