aboutsummaryrefslogtreecommitdiffstats
path: root/common/pybindings.cc
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2018-06-12 19:56:03 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2018-06-12 19:56:03 +0200
commit9953012154f18ea51ff9216529089715ba79fb41 (patch)
tree3f5c40b3b490d4c526f887965eaaf513bf75c71b /common/pybindings.cc
parent301136db033e6696b7d606f9833474fdd5e77aac (diff)
downloadnextpnr-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/pybindings.cc')
-rw-r--r--common/pybindings.cc4
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