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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user