1
0
mirror of https://github.com/janet-lang/janet synced 2025-11-13 13:57:19 +00:00

Don't use generated headers for embedded janet

code, use object files.
This commit is contained in:
Calvin Rose
2018-12-06 14:30:11 -05:00
parent 97fade8197
commit 7668cd5772
8 changed files with 45 additions and 49 deletions

View File

@@ -21,9 +21,11 @@
*/
#include <janet/janet.h>
#include <generated/webinit.h>
#include <emscripten.h>
extern const unsigned char *janet_gen_webinit;
extern size_t janet_gen_webinit_size;
static JanetFiber *repl_fiber = NULL;
static JanetBuffer *line_buffer = NULL;
static const uint8_t *line_prompt = NULL;
@@ -78,7 +80,7 @@ void repl_init(void) {
/* Run startup script */
Janet ret;
status = janet_dobytes(env, janet_gen_webinit, sizeof(janet_gen_webinit), "webinit.janet", &ret);
status = janet_dobytes(env, janet_gen_webinit, janet_gen_webinit_size, "webinit.janet", &ret);
if (status == JANET_SIGNAL_ERROR) {
printf("start up error.\n");
janet_deinit();