1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-30 15:13:03 +00:00

Add source amalgamation

The amalgamated source concatenates all sources
to a file janet.c which can be used for
embedding janet, much in the same way as sqlite
or mongoose.
This commit is contained in:
Calvin Rose
2019-01-24 00:15:58 -05:00
parent 4d81fbc238
commit 611543c48b
44 changed files with 373 additions and 216 deletions

View File

@@ -20,9 +20,12 @@
* IN THE SOFTWARE.
*/
#include <setjmp.h>
#ifndef JANET_AMALG
#include <janet/janet.h>
#include "util.h"
#endif
#include <setjmp.h>
/* Conditionally compile this file */
#ifdef JANET_ASSEMBLER
@@ -930,7 +933,7 @@ static Janet cfun_disasm(int32_t argc, Janet *argv) {
return janet_disasm(f->def);
}
static const JanetReg cfuns[] = {
static const JanetReg asm_cfuns[] = {
{"asm", cfun_asm,
JDOC("(asm assembly)\n\n"
"Returns a new function that is the compiled result of the assembly.\n"
@@ -948,7 +951,7 @@ static const JanetReg cfuns[] = {
/* Load the library */
void janet_lib_asm(JanetTable *env) {
janet_cfuns(env, NULL, cfuns);
janet_cfuns(env, NULL, asm_cfuns);
}
#endif