diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2018-06-12 19:56:03 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2018-06-12 19:56:03 +0200 |
commit | 9953012154f18ea51ff9216529089715ba79fb41 (patch) | |
tree | 3f5c40b3b490d4c526f887965eaaf513bf75c71b /common | |
parent | 301136db033e6696b7d606f9833474fdd5e77aac (diff) | |
download | nextpnr-9953012154f18ea51ff9216529089715ba79fb41.tar.gz nextpnr-9953012154f18ea51ff9216529089715ba79fb41.tar.bz2 nextpnr-9953012154f18ea51ff9216529089715ba79fb41.zip |
reveresed logic for enabling main file, and made tests link arch files
Diffstat (limited to 'common')
-rw-r--r-- | common/pybindings.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/pybindings.cc b/common/pybindings.cc index 7c43c84f..761d6571 100644 --- a/common/pybindings.cc +++ b/common/pybindings.cc @@ -140,7 +140,7 @@ static wchar_t *program; void init_python(const char *executable) { -#ifndef PYTHON_MODULE +#ifdef MAIN_EXECUTABLE program = Py_DecodeLocale(executable, NULL); if (program == NULL) { fprintf(stderr, "Fatal error: cannot decode executable filename\n"); @@ -162,7 +162,7 @@ void init_python(const char *executable) void deinit_python() { -#ifndef PYTHON_MODULE +#ifdef MAIN_EXECUTABLE Py_Finalize(); PyMem_RawFree(program); #endif |