gdjn  Diff

Differences From Artifact [57a8603486]:

To Artifact [8b30a5746f]:


315
316
317
318
319
320
321
322


323
324

325
326

327
328
329
330
331
332
333
		_err("no init fn in api envtbl");
		goto fail;
	}
	auto initFn = janet_unwrap_function(
			janet_table_get(janet_unwrap_table(initDef), 
				janet_ckeywordv("value")));
	Janet ret;
	auto e = janet_pcall(initFn, 0, nullptr, &ret, nullptr);


	if (e == JANET_SIGNAL_ERROR) {
		_err("failed to unpack the janet environment");

		goto fail;
	}

	printf("environment load complete\n");
fail:
	janet_gcunlock(gc);
	/* janet_collect(); */
}

JanetTable* gdjn_vm_api_build_compTime(void) {







|
>
>

|
>


>







315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
		_err("no init fn in api envtbl");
		goto fail;
	}
	auto initFn = janet_unwrap_function(
			janet_table_get(janet_unwrap_table(initDef), 
				janet_ckeywordv("value")));
	Janet ret;
	auto e = janet_pcall(initFn, 1,
			(Janet[]) {janet_wrap_table(tgt)},
			&ret, nullptr);
	if (e == JANET_SIGNAL_ERROR) {
		_errMsg("failed to unpack the janet environment",
			(char*)janet_unwrap_string(ret));
		goto fail;
	}
	/* janet_table_merge_table(tgt, janet_unwrap_table(ret)); */
	printf("environment load complete\n");
fail:
	janet_gcunlock(gc);
	/* janet_collect(); */
}

JanetTable* gdjn_vm_api_build_compTime(void) {