mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-29 17:38:46 +00:00
Merge pull request #5173 from RonxBulld/refine_setup_shutdown_flags
Allows calling yosys_shutdown and then yosys_setup to restart.
This commit is contained in:
commit
513f0f16dd
1 changed files with 3 additions and 2 deletions
|
@ -187,12 +187,14 @@ int run_command(const std::string &command, std::function<void(const std::string
|
|||
#endif
|
||||
|
||||
bool already_setup = false;
|
||||
bool already_shutdown = false;
|
||||
|
||||
void yosys_setup()
|
||||
{
|
||||
if(already_setup)
|
||||
return;
|
||||
already_setup = true;
|
||||
already_shutdown = false;
|
||||
|
||||
#ifdef WITH_PYTHON
|
||||
// With Python 3.12, calling PyImport_AppendInittab on an already
|
||||
|
@ -224,12 +226,11 @@ bool yosys_already_setup()
|
|||
return already_setup;
|
||||
}
|
||||
|
||||
bool already_shutdown = false;
|
||||
|
||||
void yosys_shutdown()
|
||||
{
|
||||
if(already_shutdown)
|
||||
return;
|
||||
already_setup = false;
|
||||
already_shutdown = true;
|
||||
log_pop();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue