Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 740c3ab

Browse files
committed
[[ Emscripten ]] Add warning above all emterpreted functions
Whenever the signature of these functions changes, the emterpreter whitelist needs to be updated.
1 parent 2428eff commit 740c3ab

File tree

7 files changed

+22
-0
lines changed

7 files changed

+22
-0
lines changed

engine/src/dispatch.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,6 +1266,9 @@ void send_relaunch(void)
12661266
#endif
12671267
}
12681268

1269+
// Important: This function is on the emterpreter whitelist. If its
1270+
// signature function changes, the mangled name must be updated in
1271+
// em-whitelist.json
12691272
void send_startup_message(bool p_do_relaunch = true)
12701273
{
12711274
if (p_do_relaunch)

engine/src/dskmain.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,9 @@ bool X_init(const X_init_options& p_options)
339339
return true;
340340
}
341341

342+
// Important: This function is on the emterpreter whitelist. If its
343+
// signature function changes, the mangled name must be updated in
344+
// em-whitelist.json
342345
bool X_main_loop_iteration()
343346
{
344347
void *t_bottom;

engine/src/em-dc-mainloop.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ X_initialize_mcappcodepath(const X_init_options& p_options)
126126
nullptr);
127127
}
128128

129+
// Important: This function is on the emterpreter whitelist. If its
130+
// signature function changes, the mangled name must be updated in
131+
// em-whitelist.json
129132
bool
130133
X_init(const X_init_options& p_options)
131134
{

engine/src/em-dc.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@ MCScreenDC::GetCurrentStack()
171171
* Event loop
172172
* ================================================================ */
173173

174+
// Important: This function is on the emterpreter whitelist. If its
175+
// signature function changes, the mangled name must be updated in
176+
// em-whitelist.json
177+
174178
/* Returns true if quit is requested, or from any inner main loop. */
175179
Boolean
176180
MCScreenDC::wait(real64_t p_duration,

engine/src/eventqueue.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,9 @@ void MCEventQueueFinalize(void)
255255

256256
////////////////////////////////////////////////////////////////////////////////
257257

258+
// Important: This function is on the emterpreter whitelist. If its
259+
// signature function changes, the mangled name must be updated in
260+
// em-whitelist.json
258261
static void MCEventQueueDispatchEvent(MCEvent *p_event)
259262
{
260263
MCEvent *t_event;

engine/src/globals.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,6 +1053,9 @@ X_open_environment_variables(MCStringRef envp[])
10531053

10541054
/* ---------------------------------------------------------------- */
10551055

1056+
// Important: This function is on the emterpreter whitelist. If its
1057+
// signature function changes, the mangled name must be updated in
1058+
// em-whitelist.json
10561059
bool X_open(int argc, MCStringRef argv[], MCStringRef envp[])
10571060
{
10581061
MCperror = new (nothrow) MCError();

engine/src/mode_standalone.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,9 @@ MCDispatch::startup()
738738

739739
#else
740740

741+
// Important: This function is on the emterpreter whitelist. If its
742+
// signature function changes, the mangled name must be updated in
743+
// em-whitelist.json
741744
IO_stat MCDispatch::startup(void)
742745
{
743746
char *t_mccmd;

0 commit comments

Comments
 (0)