From 9953012154f18ea51ff9216529089715ba79fb41 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Tue, 12 Jun 2018 19:56:03 +0200 Subject: reveresed logic for enabling main file, and made tests link arch files --- common/pybindings.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common') 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 -- cgit v1.2.3