this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #2118 from AlecTroemel/janet-sandbox

update janet vendor, sandbox file (and everything else), implement OVR callback

authored by

Vadim Grigoruk and committed by
GitHub
39d96f70 7be33dc4

+13
+1
README.md
··· 237 237 * Jeremiasz Nelz - [Github @remi6397](https://github.com/remi6397) [WWW](https://nelz.pl) 238 238 * Thorben Krüger - [Mastodon @benthor@chaos.social](https://chaos.social/@benthor) 239 239 * David St-Hilaire - [GitHub @sthilaid](https://github.com/sthilaid) 240 + * Alec Troemel - [Github @alectroemel](https://github.com/AlecTroemel)
+12
src/api/janet.c
··· 1030 1030 { 1031 1031 closeJanet(tic); 1032 1032 janet_init(); 1033 + janet_sandbox(JANET_SANDBOX_ALL); 1033 1034 1034 1035 JanetTable *env = janet_core_env(NULL); 1035 1036 JanetTable *sub_env = janet_table(0); ··· 1094 1095 1095 1096 if (status != JANET_SIGNAL_OK) { 1096 1097 reportError(core, result); 1098 + } 1099 + 1100 + // call OVR() callback for backward compatibility 1101 + (void)janet_resolve(core->currentVM, janet_csymbol(OVR_FN), &pre_fn); 1102 + if (janet_type(pre_fn) == JANET_FUNCTION) { 1103 + JanetFunction *ovr_fn = janet_unwrap_function(pre_fn); 1104 + JanetSignal status = janet_pcall(ovr_fn, 0, NULL, &result, &GameFiber); 1105 + 1106 + if (status != JANET_SIGNAL_OK) { 1107 + reportError(core, result); 1108 + } 1097 1109 } 1098 1110 } 1099 1111