Skip to content

Commit

Permalink
Plugins: Another plugin needs to load __main__ constants
Browse files Browse the repository at this point in the history
  • Loading branch information
kayhayen committed Dec 25, 2020
1 parent 33a2ac0 commit 7ab72dd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nuitka/build/include/nuitka/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ extern void createGlobalConstants(void);
extern void checkGlobalConstants(void);
#endif

#if _NUITKA_PLUGIN_MULTIPROCESSING_ENABLED
#if _NUITKA_PLUGIN_MULTIPROCESSING_ENABLED || _NUITKA_PLUGIN_TRACEBACK_ENCRYPTION_ENABLED
// Call this to initialize __main__ constants in slave processes on Windows.
extern void createMainModuleConstants(void);
#endif
Expand Down
2 changes: 1 addition & 1 deletion nuitka/build/static_src/MainProgram.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ int main(int argc, char **argv) {
/* Complex call helpers need "__main__" constants, even if we only
* go into "__parents__main__" module as a start point.
*/
#if _NUITKA_PLUGIN_MULTIPROCESSING_ENABLED
#if _NUITKA_PLUGIN_MULTIPROCESSING_ENABLED || _NUITKA_PLUGIN_TRACEBACK_ENCRYPTION_ENABLED
createMainModuleConstants();
#endif

Expand Down
2 changes: 1 addition & 1 deletion nuitka/codegen/templates/CodeTemplatesModules.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
}
/* For multiprocessing, we want to be able to initialize the __main__ constants. */
#if _NUITKA_PLUGIN_MULTIPROCESSING_ENABLED && %(is_main_module)s
#if (_NUITKA_PLUGIN_MULTIPROCESSING_ENABLED || _NUITKA_PLUGIN_TRACEBACK_ENCRYPTION_ENABLED) && %(is_main_module)s
void createMainModuleConstants(void) {
createModuleConstants();
}
Expand Down

0 comments on commit 7ab72dd

Please sign in to comment.